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

sbt 1.10.1 (was 1.9.9) #20157

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

sbt 1.10.1 (was 1.9.9) #20157

wants to merge 1 commit into from

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Apr 10, 2024

not for merge until 1.10.0 final; but let's see if CI likes it

@SethTisue SethTisue changed the title sbt 1.10.0-RC1 (was 1.9.9) sbt 1.10.0-RC2 (was 1.9.9) Apr 15, 2024
@SethTisue
Copy link
Member Author

@eed3si9n the test failures here worry me somewhat, but I might not have time this week to look into it

@eed3si9n
Copy link
Member

Acknowledged. Thanks for starting this, @SethTisue!

@eed3si9n
Copy link
Member

Opened sbt/zinc#1351

@eed3si9n
Copy link
Member

FYI @bishabosha - new Zinc 1.10.x breaks scripted test added by #18880.
https://github.com/scala/scala3/actions/runs/8690208123/job/23829593105#step:9:342

[info] [error] java.lang.RuntimeException: Can't find source file for a.A.Inner_sel
[info] [error] 	at scala.sys.package$.error(package.scala:30)
[info] [error] 	at sbt.internal.inc.Analysis$.$anonfun$sources$1(Analysis.scala:105)
[info] [error] 	at scala.Option.getOrElse(Option.scala:189)
[info] [error] 	at sbt.internal.inc.Analysis$.sourceFileForClass$1(Analysis.scala:105)
[info] [error] 	at sbt.internal.inc.Analysis$.isJavaClass$1(Analysis.scala:107)
[info] [error] 	at sbt.internal.inc.Analysis$.$anonfun$sources$2(Analysis.scala:108)
[info] [error] 	at sbt.internal.inc.Analysis$.$anonfun$sources$2$adapted(Analysis.scala:108)
[info] [error] 	at scala.collection.TraversableLike.$anonfun$partition$1(TraversableLike.scala:450)
[info] [error] 	at scala.collection.immutable.HashMap$HashMapKeys.$anonfun$foreach$1(HashMap.scala:150)
[info] [error] 	at scala.collection.immutable.HashMap$HashMap1.foreachEntry(HashMap.scala:401)
[info] [error] 	at scala.collection.immutable.HashMap$HashTrieMap.foreachEntry(HashMap.scala:735)
[info] [error] 	at scala.collection.immutable.HashMap$HashTrieMap.foreachEntry(HashMap.scala:735)
[info] [error] 	at scala.collection.immutable.HashMap$HashMapKeys.foreach(HashMap.scala:150)
[info] [error] 	at scala.collection.TraversableLike.partition(TraversableLike.scala:450)
[info] [error] 	at scala.collection.TraversableLike.partition$(TraversableLike.scala:448)
[info] [error] 	at scala.collection.AbstractTraversable.partition(Traversable.scala:108)
[info] [error] 	at sbt.internal.inc.Analysis$.sources(Analysis.scala:108)
[info] [error] 	at sbt.internal.inc.IncrementalCommon$CycleState$IncrementalCallbackImpl.mergeAndInvalidate(IncrementalCommon.scala:193)
[info] [error] 	at sbt.internal.inc.IncrementalCommon$CycleState$IncrementalCallbackImpl.completeCycle(IncrementalCommon.scala:209)
[info] [error] 	at sbt.internal.inc.AnalysisCallback.getCycleResultOnce(Incremental.scala:940)
[info] [error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:455)
[info] [error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:117)
[info] [error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[info] [error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[info] [error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:265)
[info] [error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:409)
[info] [error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:496)
[info] [error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:396)
[info] [error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:170)
[info] [error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[info] [error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[info] [error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[info] [error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[info] [error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)

I can' tell if this is uncovering some changes Zinc made in 1.10.0 (https://eed3si9n.com/sbt-1.10.0-beta), or uncovering some issue with the compiler bridge.

@bishabosha
Copy link
Member

bishabosha commented Apr 22, 2024

@eed3si9n on the current main branch with sbt 1.9.9, I printed out the relations after a/compile in that task and it seems some classes are missing (such as a.A.Inner_sel):

class names: Relation [
  ${BASE}/a/src/main/scala/a/A.java -> a.A
  ${BASE}/a/src/main/scala/a/A.java -> a.A$.Inner
  ${BASE}/a/src/main/scala/a/A.java -> a.A$.Inner_sel
  ${BASE}/a/src/main/scala/a/AImport.java -> a.AImport
  ${BASE}/a/src/main/scala/a/AImport.java -> a.AImport.Inner
]

here are the set of apis.allInternalClasses:

[
  a.A,
  a.AImport.Inner,
  a.A$.Inner_sel,
  a.A.Inner_sel,
  a.AImport,
  a.A$.Inner,
  a.A.Inner,
  a.AImport$.Inner
]

@eed3si9n
Copy link
Member

@bishabosha Thanks. To clarify, you mean it's there in sbt 1.9.9, but those entries that should be coming from Java sources are missing in sbt 1.10.0-RC2, right?

@bishabosha
Copy link
Member

bishabosha commented Apr 22, 2024

@eed3si9n both those outputs are with sbt 1.9.9. From what I understand (please verify), the class names relation comes from generatedNonLocalClass callback, and allInternalClasses are just whatever was recorded by ExtractAPI phase - so should these contain the same classes?

@eed3si9n
Copy link
Member

eed3si9n commented Apr 22, 2024

https://github.com/scala/scala3/blob/05114dd6bcd007a6becc83011fe9916d35ba4716/sbt-test/pipelining/Yjava-tasty-fromjavaobject/a/src/main/scala/a/A.java

If Java compiler works like Scala compiler, I guess javac only emits a.A$.Inner_sel.class, but it generates some forwarder so humans can write a.A.Inner_sel?

eed3si9n added a commit to eed3si9n/sbt that referenced this pull request May 5, 2024
**Problem**
scala/scala3#20157 identified that
`sbt-dotty/dotty-knowledge.i17` scripted test fails on sbt 1.10.0-RC2.
The regression happened in https://github.com/sbt/sbt/pull/7480/files#diff-6d9589bfb3f1247d2eace99bab7e928590337680d1aebd087d9da286586fba77L739-L740
where global setting was removed, and moved to project level.

**Solution**
This restores the global setting that is apparently referenced by
now defunct Dotty plugin.
@SethTisue
Copy link
Member Author

The scripted tests are now running afoul of SIP-51 😆 I'll update it soon-ish

@SethTisue SethTisue changed the title sbt 1.10.0-RC2 (was 1.9.9) sbt 1.10.0 (was 1.9.9) May 7, 2024
adpi2 added a commit that referenced this pull request May 14, 2024
## Problem

#20157 demonstrated that some build
pipelining tests fail on the latest sbt 1.10.0-RC2:

```
Error:  (sbt-test / scripted) Failed tests:
Error:  	pipelining/Yjava-tasty-fromjavaobject
Error:  	pipelining/Yjava-tasty-paths
```

This is likely caused by inconsistent capturing of APIs from Java
sources in ExtractAPI vs AnalyzingJavaCompiler in Zinc.

## Solution
This adjusts the API name entry for Java nested classes.
@SethTisue SethTisue changed the title sbt 1.10.0 (was 1.9.9) sbt 1.10.1 (was 1.9.9) Aug 14, 2024
@mbovel
Copy link
Member

mbovel commented Sep 13, 2024

Out of curiosity, why not also updating the sbt version in tests and community projects as you did in 19a6990?

@SethTisue
Copy link
Member Author

oh, I suppose I'd have gotten to that before undraft-ing it

anyway, I've just updated it

if CI still fails, I won't have time to look at it until October, so if somebody's in more of a hurry than that, please feel free to take it over

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants