-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[POC] sbt 1.5.0 validation #11568
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
Closed
Closed
[POC] sbt 1.5.0 validation #11568
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0c753c7
bump to sbt 1.5.0-RC2
adpi2 dff8f8e
Remove meta-dependency on DottyPlugin
adpi2 718066c
Remove sbt-dotty from sbt-community-build scripted
adpi2 f6108fe
Remove sbt-dotty from sbt-dotty scripted
adpi2 6022498
Remove sbt-dotty from community-build tests
adpi2 2dad2e2
Remove sbt-dotty in community-projects
adpi2 37c6d18
Bump to sbt-dotty 0.5.3 when SpiewakPlugin is used
adpi2 2302983
Exclude scodec and cats-effect from community-docs
adpi2 1d9d2b6
Upgrade to latest sbt nightly
adpi2 7156ed7
Fix auto scala-library
adpi2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Equal
updated
3 files
+3 −3 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule Log
updated
3 files
+1 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule Lucre
updated
3 files
+5 −5 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule ScalaPB
updated
3 files
+5 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule Serial
updated
3 files
+4 −4 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule akka
updated
3 files
+4 −5 | project/Dependencies.scala | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule algebra
updated
3 files
+4 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule betterfiles
updated
3 files
+4 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule cats
updated
3 files
+3 −0 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule discipline
updated
3 files
+1 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule discipline-munit
updated
3 files
+1 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule discipline-specs2
updated
3 files
+4 −4 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule effpi
updated
3 files
+4 −4 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule endpoints4s
updated
from 9433bf to c5b6c4
Submodule fastparse
updated
3 files
+5 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+1 −2 | project/build.sbt |
Submodule minitest
updated
3 files
+7 −7 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule munit
updated
3 files
+2 −2 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule scala-collection-compat
updated
3 files
+3 −3 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule scala-parallel-collections
updated
3 files
+5 −5 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule scala-parser-combinators
updated
3 files
+3 −3 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule scala-stm
updated
3 files
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt | |
+1 −1 | shared/src/main/scala/scala/concurrent/stm/ccstm/ViewOps.scala |
Submodule scala-xml
updated
3 files
+2 −2 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule scalacheck
updated
3 files
+7 −7 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugin.sbt |
Submodule scalatest
updated
4 files
+4 −2 | project/DottyBuild.scala | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt | |
+2 −4 | project/scalatest.scala |
Submodule scalatestplus-junit
updated
3 files
+10 −10 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule scalatestplus-scalacheck
updated
3 files
+1 −1 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −2 | project/plugins.sbt |
Submodule scalaz
updated
5 files
+3 −3 | build.sbt | |
+52 −0 | project/DottyBuild.scala | |
+1 −1 | project/build.properties | |
+3 −5 | project/build.scala | |
+0 −1 | project/plugins.sbt |
Submodule sconfig
updated
3 files
+4 −4 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −3 | project/plugins.sbt |
Submodule shapeless
updated
4 files
+1 −1 | build.sbt | |
+52 −0 | project/DottyBuild.scala | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule simulacrum-scalafix
updated
3 files
+5 −5 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule xml-interpolator
updated
3 files
+2 −2 | build.sbt | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
Submodule zio
updated
4 files
+1 −1 | build.sbt | |
+6 −4 | project/BuildHelper.scala | |
+1 −1 | project/build.properties | |
+0 −1 | project/plugins.sbt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package sbt | ||
|
||
import sbt.internal.classpath.ClassLoaderCache | ||
import sbt.internal.inc.ScalaInstance | ||
|
||
object Bootstrap { | ||
// copied from https://github.com/sbt/sbt/blob/33e2bfe2810246c8e4e1b37ec110d15e588a4fce/main/src/main/scala/sbt/Defaults.scala#L1120-L1165 | ||
def makeScalaInstance( | ||
version: String, | ||
libraryJars: Array[File], | ||
allCompilerJars: Seq[File], | ||
allDocJars: Seq[File], | ||
state: State, | ||
topLoader: ClassLoader | ||
): ScalaInstance = { | ||
val classLoaderCache = state.extendedClassLoaderCache | ||
val compilerJars = allCompilerJars.filterNot(libraryJars.contains).distinct.toArray | ||
val docJars = allDocJars | ||
.filterNot(jar => libraryJars.contains(jar) || compilerJars.contains(jar)) | ||
.distinct.toArray | ||
val allJars = libraryJars ++ compilerJars ++ docJars | ||
|
||
val libraryLoader = classLoaderCache(libraryJars.toList, topLoader) | ||
val compilerLoader = classLoaderCache(compilerJars.toList, libraryLoader) | ||
val fullLoader = | ||
if (docJars.isEmpty) compilerLoader | ||
else classLoaderCache(docJars.distinct.toList, compilerLoader) | ||
new ScalaInstance( | ||
version = version, | ||
loader = fullLoader, | ||
loaderCompilerOnly = compilerLoader, | ||
loaderLibraryOnly = libraryLoader, | ||
libraryJars = libraryJars, | ||
compilerJars = compilerJars, | ||
allJars = allJars, | ||
explicitActual = Some(version) | ||
) | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this method be made public upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think that's worth it. It's only useful for works on the Scala compilers and we probably don't want to maintain compatibility just in case other people use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your call, but It seems better than having to deal with the complicated classloader caching logic API directly. And does this need to be in
package sbt
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does because the
ScalaInstance
constructor is package private. But we could as well create our ownScalaInstance
implementation.This code is a quick and dirty copy-paste, it can be made simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks public to me (https://github.com/sbt/zinc/blob/13ddb10938237263f706174439d8ed055e8e4ac2/internal/zinc-classpath/src/main/scala/sbt/internal/inc/ScalaInstance.scala#L34-L43), and weren't we already using it before this PR?