Skip to content

Add warnings for -save & -nosave legacy scala runner options instead of failing #1679

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

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Dec 13, 2022

Fixes #1670

for scala-cli:

▶ scala-cli -e 'println("Hello")' -save -nosave
Deprecated option '-save' is ignored.
The compiled project files will be saved in the '.scala-build' directory in the project root folder.
If an actual jar file is necessary to be saved, run the 'package' sub-command after this one:
  scala-cli package --library -e println("Hello")
Deprecated option '-nosave' is ignored.
A jar file is not saved unless the 'package' sub-command is called.
Compiling project (Scala 3.2.1, JVM)
Compiled project (Scala 3.2.1, JVM)
Hello

for scala (SIP mode):

▶ scala -e 'println("Hello")' -save -nosave
Deprecated option '-save' is ignored.
The compiled project files will be saved in the '.scala-build' directory in the project root folder.
If an actual jar file is necessary to be saved, run the '--power package' sub-command after this one:
  scala --power package --library -e println("Hello")
Deprecated option '-nosave' is ignored.
A jar file is not saved unless the '--power package' sub-command is called.
Compiling project (Scala 3.2.1, JVM)
Compiled project (Scala 3.2.1, JVM)
Hello

@Gedochao Gedochao added the SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command. label Dec 13, 2022
@Gedochao Gedochao force-pushed the support-legacy-save-nosave branch 3 times, most recently from 8fbd491 to abb02a2 Compare December 15, 2022 13:52
@Gedochao Gedochao force-pushed the support-legacy-save-nosave branch from ade1c51 to a265db7 Compare December 16, 2022 10:59
Copy link
Contributor

@lwronski lwronski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Gedochao Gedochao merged commit 36a0a9f into VirtusLab:main Dec 16, 2022
@Gedochao Gedochao deleted the support-legacy-save-nosave branch December 16, 2022 13:00
@Gedochao
Copy link
Contributor Author

relevant docs will be added as part of #1721

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
None yet
Development

Successfully merging this pull request may close these issues.

Option -save is not supported
4 participants