-
Notifications
You must be signed in to change notification settings - Fork 939
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
assertion failed: When nameHashing
is disabled names
relation should be empty: $names
#1071
Comments
What about Also, I assume you did run |
same for 'last compile' and 'last tehproject/compile:compile' , yes i did clean all projects |
It's really strange. Can you share this project or reproduce it in a sample project so I can have a look into it? |
i'll try to minimize it but it was too weird and spurious, so can't promise anything |
Thanks a lot! Is your project a Play project or just a plain sbt project? Also, it's really strange if this problem is not deterministic. The whole incremental compiler is deterministic. |
Hi @OlegYch! Did you have a chance to minimize a sample reproducing this problem? |
sorry, i haven't managed to minimize it yet |
dunno, really |
Actually, I finally reproduced it deterministically. The way to reproduce is very simple. Create a project with just one source file: // Foo.scala
class Foo then:
It will crash with the error from this ticket. You could observe that (non-deterministically) without restarting sbt if GC happened to clean hacky Analysis cache we have. See #1081 for details. |
The CompileSetup class is being used to detect changes to arguments of incremental compiler that affect result of compilation and trigger recompilation. Examples of such arguments include, the target (output) directory, Scala compiler options, Scala compiler version, etc. By adding `nameHashing` to CompileSetup we have a chance to handle change to that flag smoothly by throwing away old Analysis object and starting with an empty one. That's implemented in AggressiveComile by extending the logic that was responsible for detection of changes to CompileSetup values. Thanks to this change we fix sbt#1081. Analysis formats has been updated to support persisting of newly added value in CompileSetup. We used to not store the value of `nameHashing` flag in persisted Analysis file and infer it from contents of relations but that leads to issue sbt#1071 when empty relations are involved. Given the fact that CompileSetup stores `nameHashing` value now, we can just use it when reading relations and fix sbt#1071. This requires reading/writing compile setup before reading relations. I decided to make that change even if there's a comment saying that reading/writing relations first was done intentionally.
The CompileSetup class is being used to detect changes to arguments of incremental compiler that affect result of compilation and trigger recompilation. Examples of such arguments include, the target (output) directory, Scala compiler options, Scala compiler version, etc. By adding `nameHashing` to CompileSetup we have a chance to handle change to that flag smoothly by throwing away old Analysis object and starting with an empty one. That's implemented in AggressiveComile by extending the logic that was responsible for detection of changes to CompileSetup values. Thanks to this change we fix sbt#1081. Analysis formats has been updated to support persisting of newly added value in CompileSetup. We used to not store the value of `nameHashing` flag in persisted Analysis file and infer it from contents of relations but that leads to issue sbt#1071 when empty relations are involved. Given the fact that CompileSetup stores `nameHashing` value now, we can just use it when reading relations and fix sbt#1071. This requires reading/writing compile setup before reading relations. I decided to make that change even if there's a comment saying that reading/writing relations first was done intentionally.
The CompileSetup class is being used to detect changes to arguments of incremental compiler that affect result of compilation and trigger recompilation. Examples of such arguments include, the target (output) directory, Scala compiler options, Scala compiler version, etc. By adding `nameHashing` to CompileSetup we have a chance to handle change to that flag smoothly by throwing away old Analysis object and starting with an empty one. That's implemented in AggressiveComile by extending the logic that was responsible for detection of changes to CompileSetup values. Thanks to this change we fix sbt#1081. Analysis formats has been updated to support persisting of newly added value in CompileSetup. We used to not store the value of `nameHashing` flag in persisted Analysis file and infer it from contents of relations but that leads to issue sbt#1071 when empty relations are involved. Given the fact that CompileSetup stores `nameHashing` value now, we can just use it when reading relations and fix sbt#1071. This requires reading/writing compile setup before reading relations. I decided to make that change even if there's a comment saying that reading/writing relations first was done intentionally.
using 0.13.2-M1 with incOptions := incOptions.value.withNameHashing(true)
i get the error on incremental compilation
last doesn't show stacktrace for some reason
The text was updated successfully, but these errors were encountered: