Repository navigation
Scala 3.10.0 and sbt 2.0.10 - #204
Merged
Merged
Conversation
- scalaVersion 3.9.0 -> 3.10.0; sbt 1.13.0 -> 2.0.10 (build definitions
now compile with Scala 3, so project/*.scala files were ported)
- drop unmaintained plugins with no sbt 2.x builds:
- sbt-antlr4 -> project/Antlr4.scala, an in-process ANTLR 4 codegen
task wired into dataflowengineoss' sourceGenerators
- sbt-github-packages -> project/GithubPackages.scala, a minimal
auto-plugin keeping githubOwner/githubRepository -> publishTo
- bump sbt-native-packager 1.13.0, sbt-scalafmt 2.6.2, sbt-assembly 2.5.0
- sbt 2 porting: slash-syntax and Keys.platform clash in root build.sbt,
Def.uncached for File-returning tasks, HashedVirtualFileRef mappings,
BareBuildSyntax.dependsOn, FileChangesMacro-free javacc staleness
- Scala 3.10 fixes: auto-tupling removal (has(key, value), .of(value)
instead of ->), null-only catch-alls, Cpg(using g), dropRightInPlace
…bok classpath - add x2cpg TestResources: sbt 2 serves test resources from its content-addressed store as jar URLs, so tests that walk directories or hand paths to external tools now extract them to real temp dirs (jssrc2cpg astgen fixtures, edg2atom goldens, jimple2cpg unpacking) - run suites sequentially (Test/parallelExecution := false): soot's Scene and other JVM-global state get corrupted when suites overlap in the forked test JVM, which sbt 2's runner lays out more aggressively - Delombok: sbt 2 forks tests in a worker whose java.class.path only has the worker jars, so derive the fork classpath from the classloader - purge the .chen ast-fragment cache between toolchain upgrades and ignore it
- root build.sbt: sbt 2 applies bare settings to every subproject, so `publish / skip` silenced publishing everywhere and createDistribution ran (and copied the zip) once per project; both now live on root - GithubPackages: restore what sbt-github-packages did besides publishTo: the appthreat package registry resolver (cpg2 is only published there), scmInfo/homepage, pomIncludeRepository, and requires JvmPlugin - Delombok: the classloader URLs were joined as file: URLs, which only worked on Unix by accident; keep java.class.path and add lombok's jar when the sbt 2 test worker's property lacks it - tests: Test / testForkedParallel := false restores sbt 1's sequential suites without serializing in-process tests; Test / exportJars := false keeps resources as plain files, so TestResources goes away - CI runs testFull: sbt 2's test only reruns what changed - Versions.antlr comes from the ANTLR tool on the meta-build classpath - drop the dead generateScaladocs task and SbtHelper, the unused javaCCTask fileInputs, and use Def.uncached consistently
# Conflicts: # .github/workflows/pr.yml
With ';' separators and the unknown ivy2-local alias coursier ignores the whole variable and falls back to repo1-only defaults, so the launcher never used the Google mirror. Same fix atom already carries.
sbt 2 moves every project's target under target/out/jvm/scala-<version>/ of the build root, which breaks the frontend launch scripts and tests/querydb-test.sh that expect the sbt 1 staging layout.
On Windows the sbt 2 thin client exits 0 even when a command fails, and PowerShell passes an argument without spaces unquoted, so sbt.bat split "a;b" into separate words. --server runs sbt in-process as sbt 1 did, and '; ' keeps the sequence one argument on every shell.
A stage directory keeps whatever an earlier stage left in it, so with the sbt 1 layout restored a local createDistribution picked up the Scala 3.9 libraries of the last sbt 1 build next to the 3.10 ones.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moves chen to Scala 3.10.0 and sbt 2.0.10.
Most of the work is sbt 2 rather than Scala. sbt-antlr4 and sbt-github-packages have no sbt 2 builds, so a small in-process ANTLR task and a GitHub Packages auto-plugin take their place, and the build files are now Scala 3. A few sbt 2 defaults would have changed behaviour quietly, so they are pinned back:
publish / skipandcreateDistributionlive on the root project (otherwisesbt publishpublishes nothing)testForkedParallel := false), and test resources stay plain files (Test / exportJars := false)target/universal/stageagain, where the frontend scripts expect themjava.class.pathCI runs
testFullbecause sbt 2'stestonly reruns what changed, and callssbt --server "a; b": on Windows the thin client exits 0 even when a command fails, and PowerShell hands"a;b"to sbt.bat unquoted, which splits it.COURSIER_REPOSITORIESnow uses the pipe separator coursier expects.Tested on macOS and Windows 11 ARM64 with
testFull(the edga tests ran on macOS against a local edga build),createDistribution, and atom's suite against a local publish of this branch. Artifacts built with 3.10 need consumers on Scala 3.10 or later, so AppThreat/atom#281 should land with it.