-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unused arguments cause buildEngineDistribution
to generate invalid caches and prevent tests requiring the affected file from running
#8384
Comments
The problem with this bug is that merely adding a function with unused argument which is just a warning completely prevents the program from running after the indexes are rebuilt by The 'workaround' is to ensure there are no unused variables in std-lib (which is of course the desired state for production anyway) - but during development it is a bit problematic as sometimes one may want to test a partially implemented solution. The biggest issue IMO is not that a warning is not serializable (although ideally it should be), but that somehow our caches get into a state in which instead of invalidating them and re-parsing the file, they are loaded but they are malformed and the program fails. This is actually similar to intermittent IR caches issues I've been seeing from time to time - but I was never able to reliably reproduce that. This time it seems that the repro is completely deterministic. Before fixing the missing serialization logic, it may be worth to investigate what happens so that the malformed cache is not invalidated - as that could potentially also affect the other, more intermittent, failures that we cannot easily reproduce. |
Thanks for the reproducer. I'll take a look. |
Jaroslav Tulach reports a new STANDUP for yesterday (2023-11-26): Progress: - analyzing benchmarks: #8390 (comment)
Next Day: Unused argument fixes |
The problem is caused by |
Should we instead invalidate the |
Jaroslav Tulach reports a new STANDUP for yesterday (2023-11-27): Progress: - unused argument: #8384 Next Day: Unused argument fixes |
Jaroslav Tulach reports a new STANDUP for yesterday (2023-11-28): Progress: - More robust caches integrated: #8393
Next Day: chained operator blocks. |
Jaroslav Tulach reports a new STANDUP for yesterday (2023-11-29): Progress: - fixed #7904 by #8415
Next Day:
|
Jaroslav Tulach reports a new STANDUP for today (2023-11-30): Progress: - sampling the hashmaps on JDK17 & IGV graphs checking - looks OKeyish
Next Day: Integrate my PRs |
I have noticed a bug with serialization of
org.enso.compiler.core.ir.expression.warnings.Unused$FunctionArgument
. At first it looked innocuous - just preventing some IR caches from loading - but of course it should just then parse the original source and all should be fine.Well - unfortunately I have found that for some reason instead of doing that and recovering - in some scenarios (described below) the invalid cache causes the program to fail altogether.
The repro is following:
develop
andbuildEngineDistribution
insbt
.foo bar = 42
at the end ofFile.enso
- thebar
argument is unused causing a warning. See patch at the bottom.buildEngineDistribution
..\built-distribution\enso-engine-0.0.0-dev-windows-amd64\enso-0.0.0-dev\bin\enso --run .\test\Tests\src\System\File_Spec.enso
.The (4) run fails with:
We can see that constructors like
Nothing
are not resolved correctly - but they are obviously imported at the top of theFile.enso
...Apparently, adding the unused argument has broken the whole file.
For context, this is what is written out when running the second
buildEngineDistribution
:The patch for `File.enso`
The text was updated successfully, but these errors were encountered: