-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add export --json option #1840
Add export --json option #1840
Conversation
0d6f8c3
to
f3a9b66
Compare
modules/integration/src/test/scala/scala/cli/integration/ExportJsonTestDefinitions.scala
Outdated
Show resolved
Hide resolved
4c3caa1
to
7f6a5fa
Compare
a6dc18d
to
007c04c
Compare
modules/cli/src/main/scala/scala/cli/commands/export/Export.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala
Outdated
Show resolved
Hide resolved
007c04c
to
978748a
Compare
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.
NIT it'd be good to extract the refactor changes to a separate NIT commit
aside from the nitpicks, LGTM
38fce1d
to
f33651a
Compare
modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala
Outdated
Show resolved
Hide resolved
f33651a
to
07048ab
Compare
After consideration I think this PR should focus on exporting basic information about the project and mostly on what has been requested, so the list of dependencies and resolvers. The discussion on the cross-compilation for platforms and scala versions should be moved to a follow-up issue. For now the
Follow-ups to consider:
|
07048ab
to
8862a40
Compare
Just took a look. Really happy you're working on this! One thing I did notice though, which @prolativ already mentioned is that I like the more structured output than the concise string. By doing the concise string you're now forcing every consumer of this output to have to both know how and to manually parse that output to their needs instead of having it already structured. I'm not really sure what the benefit of the concise string is. Having it structured like you originally had it is much more flexible imo. |
|
I would delete this field altogether and leave scala-j/scala-native options for follow-up PRs if needed. WDYT?
By |
[UPDATE] For now the
Follow-ups to consider:
|
2aee549
to
07095e7
Compare
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.
LGTM in general.
Personally I'm not a big fan of jsEsVersion
, because:
- this name is not very intuitive IMO
- ECMAScript seems to be the standard of the language rather than its implementation but for JVM we can specify that we want to use e.g.
--jvm adopt:1.8.0-232
specifically rather than just--jvm 8
.
But at least it seems consistent with the name of the command line option
07095e7
to
0b2297d
Compare
Just curious, what was the motivation for this change? I like it, might be very useful for packaging in Nix, just wanted to know what other usecases you had :) |
The main use case we were thinking about is Scala Steward support, since there was a suggestion that export to sbt might be used as intermediary, which scared me a bit 😅 |
That suggestion turned quickly into reality: scala-steward-org/scala-steward#2933 🙈 🤣 |
No description provided.