Skip to content

Instantly share code, notes, and snippets.

@Quar
Created January 23, 2018 18:16
Show Gist options
  • Save Quar/7244109bb1b2ea624a7e0070456f3ceb to your computer and use it in GitHub Desktop.
Save Quar/7244109bb1b2ea624a7e0070456f3ceb to your computer and use it in GitHub Desktop.
zsh use scalac 2.12 with optimise

Since Scala 2.12, -optimise flag of scalac was deprecated.

scalac -help shows:

Deprecated settings: -optimise Compiler flag for the optimizer in Scala 2.11 deprecated: In 2.12, -optimise enables -opt:l:inline -opt-inline-from:**. Check -opt:help for using the Scala 2.12 optimizer.

It works file in bash, while error will throw if you use without asterisks quoted in zsh 5.4.2:

$ scalac -opt:l:inline -opt-inline-from:** MY_SCRIPT_FILE.scala

zsh: no matches found: -opt-inline-from:**

To avoid this error in zsh 5.4.2, quote ** as '**':

scalac -opt:l:inline -opt-inline-from:'**' MY_SCRIPT_FILE.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment