-
Notifications
You must be signed in to change notification settings - Fork 121
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
Compile cycles can loop indefinitely #911
Comments
Maybe we can at least add a cycle limit (10?) until we can figure out a repro? |
Here is a gist with debug logging: https://gist.github.com/eatkins/fb62157ef792694ae08a56c4f93ff3b6 |
Zinc 1.0~1.3 I think sets the upper limit of the cycle to really low number like 3 - zinc/internal/compiler-interface/src/main/contraband-java/xsbti/compile/IncOptions.java Lines 12 to 14 in 6b357ae
If the setting is not respected then we've regressed in the logic in develop. |
To add to that, "transitive step" turns on Boolean We did change bunch of things in Zinc, but I'm not sure if we changed these invalidation logic beside including Java into the invalidation during pipelining. |
We really should fix this for 1.4.0. It's a nasty bug that forces you to quit sbt if you get stuck in a cycle and you have to do a clean to break the cycle. |
Another related issue is that ctrl+c doesn't allow you to cancel compilation if compilation never actually fails which is the case in an infinite cycle loop. |
This comment has been minimized.
This comment has been minimized.
I should update here that following #916 (comment) I've been able to reproduce the looping effect. diff --git a/build.sbt b/build.sbt
index 2d7013b6b..d9d7841b8 100644
--- a/build.sbt
+++ b/build.sbt
@@ -11,10 +11,10 @@ ThisBuild / version := {
val v = "1.4.0-SNAPSHOT"
nightlyVersion.getOrElse(v)
}
-ThisBuild / scalafmtOnCompile := !(Global / insideCI).value
-ThisBuild / Test / scalafmtOnCompile := !(Global / insideCI).value
+ThisBuild / scalafmtOnCompile := false // !(Global / insideCI).value
+ThisBuild / Test / scalafmtOnCompile := false // !(Global / insideCI).value
ThisBuild / turbo := true
-ThisBuild / SettingKey[Boolean]("usePipelining") := !(Global / insideCI).value
+ThisBuild / SettingKey[Boolean]("usePipelining") := false // !(Global / insideCI).value
val excludeLint = SettingKey[Set[Def.KeyedInitialize[_]]]("excludeLintKeys")
Global / excludeLint := (Global / excludeLint).?.value.getOrElse(Set.empty)
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 6a9b06cf5..1e72b3a1a 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -14,7 +14,7 @@ object Dependencies {
private val ioVersion = nightlyVersion.getOrElse("1.4.0-M8")
private val lmVersion =
sys.props.get("sbt.build.lm.version").orElse(nightlyVersion).getOrElse("1.4.0-M2")
- val zincVersion = nightlyVersion.getOrElse("1.4.0-M12")
+ val zincVersion = nightlyVersion.getOrElse("1.4.0-SNAPSHOT")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion |
If that corresponds to cycle number, we might be able to trigger transitive steps in scripted by adding more on top, like having two sources that each define multiple classes that mutually inherit the other set. |
steps
ThisBuild / SettingKey[Boolean]("usePipelining") := false
to a file local.sbt or modify build.sbtsbt -Dsbt.version=1.4.0-SNAPSHOT
)project/Dependencies.scala
to1.4.0-SNAPSHOT
problem
main-settings project cycles indefinitely
I have to kill the whole process to get out of this loop
expectation
the cycles terminate
notes
I have seen this twice but I don't know the exact circumstances that triggered it.
The text was updated successfully, but these errors were encountered: