Derive JDK version in stdlib symbols from bytecode target#890
Closed
jupblb wants to merge 1 commit into
Closed
Conversation
PackageTable previously baked the indexer's runtime JDK version into every stdlib SCIP symbol (e.g. 'jdk 11 java/lang/String#'), so the embedded version varied with whichever JVM happened to run scip-java in CI. Source it instead from the project's bytecode target: - JdkPackage gains fromClassfile/fromDirectory/fromJar/fromPath, all going through a single Files.walk traversal (jars are mounted as a NIO FileSystem). META-INF/versions/ entries are skipped so the result reflects the base bytecode target of multi-release jars. - ScipSemanticdbOptions gets a jdkPackage field; PackageTable uses it in place of JdkPackage.forRuntime(). - IndexSemanticdbCommand resolves the value from any .class under a project-owned classes dir (the -d entry parsed from javacopts.txt, which Maven and Gradle emit through scip-java's wrappers), then the sibling 'classes/' of the targetroot's parent (sbt/Maven layout), falling back to JdkPackage.forRuntime() when nothing is found. - BazelBuildTool autodetects from its output jars. - The scip.jdk.version system-property escape hatch and the test JVM pin in build.sbt/SaveSnapshots are gone; snapshot tests now autodetect jdk 11 from the minimized fixture's classfiles under JDK 11/17/21.
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.