Drop functionality related to Coursier#888
Open
jupblb wants to merge 10 commits into
Open
Conversation
This command indexed an individual Maven artifact by fetching its sources via Coursier, unzipping the -sources.jar, and running the standard indexer over the extracted tree. It is no longer needed. Removed: - IndexDependencyCommand (and its registration in ScipJava) - LibrarySnapshotGenerator / LibrarySnapshotSuite, the only caller of the command, along with the saved exposed-core snapshot output under tests/snapshots/src/main/generated/org/jetbrains/... - JavaVersion.classfileJvmVersion, roundToNearestStableRelease, classfileMajorVersion, JAVA17_VERSION, JAVA0_MAJOR_VERSION, CLASS_PATTERN, JAR_PATTERN — only used by IndexDependencyCommand. The JavaVersion class itself is kept for PackageTable and JavaVersionSuite. - CONTRIBUTING.md entry for LibrarySnapshotSuite.
…enerator With only MinimizedSnapshotScipGenerator left, the multi-generator abstractions are no longer earning their keep. Removed: - SnapshotGenerator trait (single implementation, no abstract consumer) - AggregateSnapshotGenerator (wrapped a one-element list) - SemanticdbJavacSnapshotGenerator (defined but never referenced) - SnapshotHandler.withoutFinishedEvent and the `self =>` alias (only used by the aggregate) - MinimizedSnapshotScipGenerator.onFinished (dead empty method) Collapsed: - SnapshotSuite abstract base + MinimizedSnapshotScipSuite subclass into a single concrete MinimizedSnapshotScipSuite (file renamed to match) - SaveSnapshots Map-based dispatch into a direct generator call, with handler.onFinished(context) invoked explicitly to preserve the stale-snapshot cleanup that the aggregate used to drive.
ScipBuildTool no longer fetches anything from the network.
- Maven dependency resolution: remove Dependencies.scala and the
'dependencies' field handling from compile(). Callers must
pre-resolve and populate the 'classpath' field; passing
non-empty 'dependencies' produces a hard error explaining
the migration path.
- Kotlin MPP -common JAR fetch: removed (Kotlin MPP indexing now
produces only the JVM half).
- JDK provisioning: javacPathViaCoursier deleted. javacPath now
requires either 'javaHome' in scip-java.json or JAVA_HOME in
the environment and raises a clear error otherwise.
- build.sbt: drop io.get-coursier:coursier{,-jvm} from scip-java
and the test-side coursier dep. scala-xml stays (still used
by ClasspathEntry).
- Tests: replace the two coursier-env-var tests and the two
resolution-dependent checkBuild cases with two focused tests:
rejects-dependencies-field and compiles-with-empty-classpath.
Bazel, Maven, and Gradle indexing paths are unaffected.
9e7245d to
4c40d59
Compare
The minimized17 and minimized21 subprojects compiled the same shared sources under JDK 17/21 via JavaToolchainPlugin, which shelled out to 'cs java-home' to obtain those JDKs on demand. The CI matrix (Tests (11)/(17)/(21)) already exercises the plugin under each JDK, so these subprojects were redundant. Removing them eliminates the build's last dependency on coursier.
JavaToolchainPlugin (now removed) used to set fork := true globally,
which made unit tests run in a forked JVM. Without forking, the unit
tests' TestCompiler reads System.getProperty("java.class.path") from
sbt's JVM, which doesn't include the semanticdb-javac plugin, so
compileSemanticdb produces no document and Symtab(null) NPEs.
Add Test / fork := true to the shared testSettings so unit and
snapshots projects fork like buildTools already does.
JavaToolchainPlugin (now removed) used to mask two JDK-17+ issues in the
javacPlugin project by pinning its compile JDK to 11 and stripping flags
from the doc task. With the plugin gone, both issues surface:
1. JDK 14 added Plugin.autoStart(), so JDK 17/21 javac eagerly enumerates
ServiceLoader<Plugin> providers from the compile classpath. During
incremental compilation our META-INF/services/com.sun.source.util.Plugin
descriptor lives on the classpath but SemanticdbPlugin.class isn't
built yet, so ServiceLoader throws 'Provider ... not found'.
Fix: move the descriptor from src/main/resources/ to
src/main/assembly-resources/ and inject that directory only into the
assembled fat jar via 'assembly / fullClasspath'. The descriptor is
absent from the compile classpath but still bundled in the published
jar.
2. javadoc rejects the '-g' flag that was previously added via
'javacOptions += "-g"'. The old plugin worked around this with
'(doc / javacOptions) --= List("-g")'.
Fix: scope '-g' to 'Compile / javacOptions' so it never reaches the
doc task.
213f6b4 to
e7ea166
Compare
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.
No description provided.