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

scalac -P option is not passed to scalac from the CLI #2653

Closed
earldouglas opened this issue Dec 29, 2023 · 2 comments · Fixed by #2666
Closed

scalac -P option is not passed to scalac from the CLI #2653

earldouglas opened this issue Dec 29, 2023 · 2 comments · Fixed by #2666
Labels
bug Something isn't working
Projects

Comments

@earldouglas
Copy link

Version(s)
1.1.0

Describe the bug
When trying to use the continuations compiler via scala-cli, the required -P:continuations:enable argument is not being passed scalac when provided to scala-cli via the CLI.

To Reproduce

scala-cli \
  --scala 2.12.2 \
  --compiler-plugin org.scala-lang.plugins:::scala-continuations-plugin:1.0.3 \
  --dependency org.scala-lang.plugins::scala-continuations-library:1.0.3 \
  -P:continuations:enable \
  myscript.sc

Expected behaviour
The code should compile and run, but compilation fails with this code must be compiled with the Scala continuations plugin enabled. Running scala-cli with -v -v shows that the -P argument is not being passed to scalac.

Workaround
Setting the -P argument as a directive works correctly:

//> using option -P:continuations:enable
@earldouglas earldouglas added the bug Something isn't working label Dec 29, 2023
@SethTisue
Copy link
Contributor

Note that --server=false doesn't improve the situation (I had hoped from #2621 it might)

@earldouglas
Copy link
Author

Trying to force the argument with --scalac-option -P:continuations:enable also does not work.

@Gedochao Gedochao added this to To do in Issue Board via automation Jan 8, 2024
Issue Board automation moved this from To do to Done Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants