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

Ensure compiler options relevant to syntax rewriting don't require being passed after -O #1501

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

Gedochao
Copy link
Contributor

Inspired by scala/improvement-proposals#46 (comment)

With these changes, the following scalac options don't require being passed with -O.

  • -rewrite
  • -new-syntax
  • -old-syntax
  • -source:<target>
  • -indent
  • -no-indent

This allows for simpler commands when automatically migrating to newer Scala 3 syntax.
i.e. instead of

scala-cli . -O -indent -O -new-syntax -O -rewrite -O -source -O 3.2-migration

one can just use

scala-cli . -indent -new-syntax -rewrite -source:3.2-migration

@Gedochao Gedochao added SIP-46 All the issues related to SIP-46 to turn Scala CLI into the official scala runner command. scalac compatibility Issues tied with compatibility with the scalac (compiler) command. labels Oct 27, 2022
…ing passed after `-O`:

- `-rewrite`
- `-new-syntax`
- `-old-syntax`
- `-source:<target>`
- `-indent`
- `-no-indent`
@Gedochao Gedochao force-pushed the simpler-syntax-rewriting branch from b3211a6 to 0ee742d Compare October 27, 2022 07:48
@Gedochao Gedochao merged commit 9e68014 into VirtusLab:main Oct 27, 2022
@Gedochao Gedochao deleted the simpler-syntax-rewriting branch October 27, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scalac compatibility Issues tied with compatibility with the scalac (compiler) command. 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.

2 participants