Add native tooling/runtime deps to export --json#4240
Draft
kubukoz wants to merge 1 commit intoVirtusLab:mainfrom
Draft
Add native tooling/runtime deps to export --json#4240kubukoz wants to merge 1 commit intoVirtusLab:mainfrom
kubukoz wants to merge 1 commit intoVirtusLab:mainfrom
Conversation
908f327 to
aa81e1e
Compare
kubukoz
commented
Apr 19, 2026
| |"scalaNativeVersion":"${Constants.scalaNativeVersion}", | ||
| |"scalaNativeVersion":"$nativeVersion", | ||
| |"nativeOptions": { | ||
| | "scalaNativeVersion":"$nativeVersion", |
Contributor
Author
There was a problem hiding this comment.
issue: this is duplicated
Contributor
Author
|
I need to test this out a bit more :) |
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.
Summary
nativeOptionsfield toexport --jsonoutput whenplatform == "Native", containing:scalaNativeVersion— the effective Scala Native versioncompilerPlugins— implicit compiler plugins (e.g.nscplugin)runtimeDependencies— implicit runtime deps (e.g.javalib,scala3lib)toolingDependencies— packaging-time deps (e.g.scala-native-cli)scalaNativeVersion,platform, etc.) are unchanged for backward compatibilitynativeOptionsis absentCloses #4234
Motivation
Downstream tools like scala-cli-nix need to know the full artifact closure used by
scala-cli packageto prefetch dependencies for offline builds. Previously,export --jsononly exposed user-declared dependencies, forcing downstream tools to hardcode knowledge of Scala CLI internals (implicit Native runtime/tooling deps).Example output
{ "scalaNativeVersion": "0.5.10", "nativeOptions": { "scalaNativeVersion": "0.5.10", "compilerPlugins": [ { "groupId": "org.scala-native", "artifactId": { "name": "nscplugin", "fullName": "nscplugin_3.2.2" }, "version": "0.5.10" } ], "runtimeDependencies": [ { "groupId": "org.scala-native", "artifactId": { "name": "javalib_native0.5", "fullName": "javalib_native0.5_3" }, "version": "0.5.10" }, { "groupId": "org.scala-native", "artifactId": { "name": "scala3lib_native0.5", "fullName": "scala3lib_native0.5_3" }, "version": "3.2.2+0.5.10" } ], "toolingDependencies": [ { "groupId": "org.scala-native", "artifactId": { "name": "scala-native-cli", "fullName": "scala-native-cli_2.12" }, "version": "0.5.10" } ] } }Test plan
export json with test scopeintegration test updated with expectednativeOptionsnativeOptions🤖 Generated with Claude Code