-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
sbt clean
required for project to build properly
#19309
Comments
did you try building with a 3.4 nightly? |
When I tried it earlier today, I could reproduce it systematically. Now I can't reproduce it anymore... I have no idea what changed. On the other hand, even with |
What is the failure on 3.4.0-RC1-bin-20231219-eae8831-NIGHTLY? |
@nicolasstucki I checked the errors, and they all seem to be about a breaking change in Scala 3.4: "The match type contains an illegal case". I was able to get rid of them by using the "-source:3.3" flag, as suggested in the error message. Unfortunately, there are 34 such instances in my project. Is there any documentation on that new restriction? Anyways, it's not related to the bug reported here, which I unfortunately cannot reproduce anymore. |
Ah ah, you managed to have more illegal match types in a single library than in the entire ecosystem of all published Scala 3 libraries combined. But in fact all your 34 match types come from the same issue: you're matching on an type DimMap[F[_ <: IntT] <: IntT, D] = D match
case Dim[l, t, p, m, q, n, c, a, aQ, aP, o1, o2, o3, o4, s, b] => Dim[
F[l], F[t], F[p], F[m], F[q], F[n], F[c], F[a], F[aQ], F[aP], F[o1], F[o2], F[o3], F[o4], F[s], F[b]
] inside the scope that sees type DimMap[F[_ <: IntT] <: IntT, D] = D match
case Double => Dim[
F[l], F[t], F[p], F[m], F[q], F[n], F[c], F[a], F[aQ], F[aP], F[o1], F[o2], F[o3], F[o4], F[s], F[b]
] which cannot find unique answers to what is You can escape that issue by putting those match types in a different scope that does not see the alias behind |
@sjrd Thank you for your help! I successfully moved those definitions out of the scope in which the opaque type is defined, and pushed the commit to GitHub. The updated code elicits some odd behavior from the nightly compiler, however... When running (
When running the project with 3.4.0-RC1-bin-20231219-eae8831-NIGHTLY and
When running the project with 3.4.0-RC1-bin-20231219-eae8831-NIGHTLY, but without
After that, it seems to hang indefinitely (at least 5 minutes). |
That does seem like an entirely different issue, at this point, indeed. I suggest you close this one and open another one focused on what you are experiencing now. |
I opened a new issue (during minimization, the hanging disappeared). |
Compiler version
Scala 3.3.1
sbt 1.9.8
JDK 21.0.1
Unminimized code
github.com/Bersier/physical
Issue
The project builds fine when
sbt clean compile
is used.If
sbt compile
is used afterwards without changing the code, it also runs fine.If
sbt compile
is used afterwards with even one comment changed, the project doesn't build anymore.See related issue.
The text was updated successfully, but these errors were encountered: