-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ZIO Does Not Compile Against Latest Nightly Version of Dotty #7683
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
Comments
@adamgfraser which |
@nicolasstucki See below.
|
If I publish the latest version of dotty locally it works. Maybe something is missing when publishing the artifacts. In which case 9e4ee9f looks like a likely suspect. |
If you publish it locally then the path to Quoted.scala will be a real file on your filesystem, so it makes sense that it would work and not emit a "not found" error. |
true |
I bisected it and it started in 59ea176 |
That looks completely unrelated, no idea. |
Double-checking it I saw that reverting it did not help |
It is actually 7185680 |
@adamgfraser could you try to minimize it in a self-contained example? Debugging this on the full ZIO project will be too complex and will not allow us to add a good regression test. |
so if you unzip the jar file for the artifact |
The error comes from this check: https://github.com/lampepfl/dotty/blob/0a33ad34e212d3eba2ecd41fac07dddc172e149d/compiler/src/dotty/tools/dotc/CompilationUnit.scala#L92-L95 which I don't think is actually useful. |
Yes. I was trying to minimize the example, at one point got a version with code commented out that compiled, and now I am able to compile the entire project successfully with no code commented out. So it seems like maybe there is some check for a missing file that is occurring too early, so we're not getting to the point where that file can be generated? |
In e07a728, I changed Context#withSource to set a new CompilationUnit based on the source if no compilation unit is currently set (always having a CompilationUnit set is now needed since I moved the fresh name generator inside CompilationUnit), however CompilationUnit#apply will error out if the source file does not exist, which might happen for library code. Fixed by adding a parameter to disable this check, but this is not very pretty and we should really try to design a better way to distinguish between user source files and source files we happen to know the name of because it's stored in Tasty.
In e07a728, I changed Context#withSource to set a new CompilationUnit based on the source if no compilation unit is currently set (always having a CompilationUnit set is now needed since I moved the fresh name generator inside CompilationUnit), however CompilationUnit#apply will error out if the source file does not exist, which might happen for library code. Fixed by adding a parameter to disable this check, but this is not very pretty and we should really try to design a better way to distinguish between user source files and source files we happen to know the name of because it's stored in Tasty.
Fix #7683: Fix CompilationUnit handling in Context#withSource
Thank you! |
Following up discussion in zio/zio#2412 we are not able to compile ZIO against the latest nightly version of Dotty. We are testing all PRs against Dotty 0.20 as part of our CI process so it appears that the issue relates to a change since then. Specifically, I am getting the following error:
To reproduce, you can change this line in ZIO to use the latest Dotty nightly and then attempt to compile after setting the version to Dotty or do the same thing with my local branch here.
Sorry I don't have a more detailed diagnosis. Copying @smarter and @neko-kai.
The text was updated successfully, but these errors were encountered: