-
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
https://github.com/Bersier/physical requires sbt clean compile
- fails to compile without the clean.
#15724
Comments
The project seems to fail compilation with match type reduction errors on the 3.2.0-RCs and latest nightly, so that may need to be addressed first. |
On
But compiles on
|
@dwalend It would be very helpful if you could provide minimization in a free moment. |
The code has grown since this has been reported. Here is a link to the code as it was back then. Frustratingly, I cannot even reproduce the issue at this time because of another bug:
|
I filed this ticket about the regression (assuming it is the only one). |
I was able to (finally) commit some time, and can report some updates: The part of the problem where the compiler runs for an absurdly long time seems gone in Scala 3.3.0. The part of the problem where it needs an With 3 (or 2) dimensions - just Length, Time, and Temperature - things work fine consistently without the clean. With 4 or more dimensions - Length, Time, Temperature, and Mass - the bug appears. Procedure is
as a first error. If you'd like to use my fork for bracketing and testing, start with my fork's branches: |
On the latest version of the compiler: sven@bot:~/physical$ sbt clean test
[info] welcome to sbt 1.7.1 (Ubuntu Java 11.0.19)
[info] loading global plugins from /home/sven/.sbt/1.0/plugins/project
[info] loading global plugins from /home/sven/.sbt/1.0/plugins
[info] loading project definition from /home/sven/physical/project
[info] loading settings for project root from build.sbt ...
[info] set current project to physical (in build file:/home/sven/physical/)
[success] Total time: 0 s, completed Jun 6, 2023, 4:49:09 PM
[info] compiling 14 Scala sources to /home/sven/physical/target/scala-3.3.2-RC1-bin-SNAPSHOT/classes ...
[success] Total time: 9 s, completed Jun 6, 2023, 4:49:18 PM
sven@bot:~/physical$ sbt test
[info] welcome to sbt 1.7.1 (Ubuntu Java 11.0.19)
[info] loading global plugins from /home/sven/.sbt/1.0/plugins/project
[info] loading global plugins from /home/sven/.sbt/1.0/plugins
[info] loading project definition from /home/sven/physical/project
[info] loading settings for project root from build.sbt ...
[info] set current project to physical (in build file:/home/sven/physical/)
[success] Total time: 1 s, completed Jun 6, 2023, 4:49:45 PM And the regression was just fixed by #17180. |
Fixed with #17180 |
Thanks! |
Compiler version
3.1.3
Minimized code
It's four files and a build.sbt - not very minimized, but several of us have been able to reproduce it. (If you can wait two weeks when I get a bit of free time I'd be happy to see if I can bracket the behavior. I think reporting this early is best.)
Start with https://github.com/Bersier/physical
Output (click arrow to expand)
sbt compile
will finish in maybe 10 seconds, works great, everything compiles. Successivesbt clean compile
calls work fine.Make any change - maybe rename something - to Dimensions.scala .(Another person on Scala Users reported problems when adding just a blank line.)
sbt compile
now takes so long that it seems like an infinite loop. It finishes after perhaps 10 minutes, failing to compile with a lot of excuses despite no interesting changes to the code.I don't believe the problem is the opaque type in Dimensions because I replaced it with a value class and got the same effect.
The text was updated successfully, but these errors were encountered: