Skip to content

Commit

Permalink
[Quickfix] import std lib benchmark does not fail on IR cache version…
Browse files Browse the repository at this point in the history
… mismatch (#12026)

This is a quick fix for the [IR cache version mismatch problem](#12023 (comment)).

#### Why the benchmark is failing in the first place?
The problem was encountered first in this job: https://github.com/enso-org/enso/actions/runs/12680614808/job/35342759884?pr=12023

I believe these are the steps that happened:
1. Some previous job filled in the global IR caches in `~/.local/share/enso/cache` (with older version) - for example stdlib tests that run something like `enso --run test/Base_Tests`.
2. The failing job did `buildEngineDistribution` which fills in the local IR caches in `built-distribution` with newer version but does not touch the global caches. (https://github.com/enso-org/enso/actions/runs/12680614808/job/35342759884?pr=12023#step:7:2003)
3. `ImportStandardLibraryBenchmark` [was run](https://github.com/enso-org/enso/actions/runs/12680614808/job/35342759884?pr=12023#step:7:2620) and it read the IR caches from the global location, instead from the local location, thus the compiler produced an output and an [`AssertionError` was thrown](https://github.com/enso-org/enso/actions/runs/12680614808/job/35342759884?pr=12023#step:7:2626)
  • Loading branch information
Akirathan authored Jan 9, 2025
1 parent c6f4b4a commit f5e330d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ public void setup(BenchmarkParams params) throws IOException {
@TearDown
public void teardown() {
if (!out.toString().isEmpty()) {
throw new AssertionError("Unexpected output (errors?) from the compiler: " + out.toString());
System.err.println(
"Unexpected output (warnings / errors?) from the compiler: " + out.toString());
}
context.close();
}
Expand Down

0 comments on commit f5e330d

Please sign in to comment.