Skip to content
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

Do not use invalidationResults to compute next invalidations #1312

Merged
merged 5 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ private final class AnalysisCallback(
if (!writtenEarlyArtifacts) // writing implies the updates merge has happened
mergeUpdates() // must merge updates each cycle or else scalac will clobber it
}
incHandler.completeCycle(invalidationResults, getAnalysis)
incHandler.completeCycle(None, getAnalysis)
Friendseeker marked this conversation as resolved.
Show resolved Hide resolved
} else {
throw new IllegalStateException(
"can't call AnalysisCallback#getCycleResultOnce more than once"
Expand Down
13 changes: 13 additions & 0 deletions zinc/src/sbt-test/source-dependencies/cyclic-dependency/A.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

class A() extends ABase()

14 changes: 14 additions & 0 deletions zinc/src/sbt-test/source-dependencies/cyclic-dependency/ABase.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

public abstract class ABase {
H h;
}
12 changes: 12 additions & 0 deletions zinc/src/sbt-test/source-dependencies/cyclic-dependency/H.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

class H() extends HBase()
14 changes: 14 additions & 0 deletions zinc/src/sbt-test/source-dependencies/cyclic-dependency/HBase.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

public abstract class HBase {
A a;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

class A() extends ABase()



// random placeholder change
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Zinc - The incremental compiler for Scala.
* Copyright Scala Center, Lightbend, and Mark Harrah
*
* Licensed under Apache License 2.0
* SPDX-License-Identifier: Apache-2.0
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/

public abstract class ABase {
H h;
}

// Random changes to force recompilation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pipelining = false
6 changes: 6 additions & 0 deletions zinc/src/sbt-test/source-dependencies/cyclic-dependency/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
> compile

$ copy-file changes/ABase.java ABase.java
$ copy-file changes/A.scala A.scala

> checkIterations 2