Skip to content
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

Misc scalac options fixes #1413

Merged
merged 6 commits into from
Oct 7, 2022
Merged

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Oct 3, 2022

context: #1310
Summary of changes in this PR:

  • added --scalac-verbose as an alias for -O -verbose
    • this is necessary, since plain -verbose clashes with Scala CLI's --verbose
  • ensured -release, -encoding, -color, -feature, -deprecation and -nowarn don't require being passed after -O
  • when -release and/or -target:<target> are passed with a different target JVM than --jvm, a warning will be logged
    • I initially intended to always redirect -release and -target:<target> to --jvm, but theoretically one may want to actually compile targetting one Java version and then run on another
    • thus, the warning makes it that little bit easier to notice the difference
    • this is all the more troublesome, as -target has been deprecated for a long while (and is unstable even for Scala versions which still allow this option); there is maybe a need for disambiguation in the future (unsure if it's worth the effort, though)
    • for most normal (sane) use cases, --jvm is the superior, more flexible option for scala-cli

@Gedochao Gedochao force-pushed the scalac-compat-fixes branch 2 times, most recently from c3e6832 to 96a0f2b Compare October 4, 2022 09:35
@Gedochao Gedochao marked this pull request as ready for review October 4, 2022 10:54
@Gedochao Gedochao added the SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command. label Oct 4, 2022
@Gedochao Gedochao marked this pull request as draft October 6, 2022 06:48
@Gedochao Gedochao force-pushed the scalac-compat-fixes branch 2 times, most recently from 318c8ae to 87b6b98 Compare October 6, 2022 12:57
@Gedochao Gedochao marked this pull request as ready for review October 6, 2022 13:18
@Gedochao Gedochao requested a review from lwronski October 6, 2022 13:18
@Gedochao Gedochao merged commit d365159 into VirtusLab:main Oct 7, 2022
@Gedochao Gedochao deleted the scalac-compat-fixes branch October 7, 2022 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants