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

DottyJS doesn't understand -P flag #9783

Closed
djspiewak opened this issue Sep 13, 2020 · 1 comment
Closed

DottyJS doesn't understand -P flag #9783

djspiewak opened this issue Sep 13, 2020 · 1 comment

Comments

@djspiewak
Copy link

It's standard practice to add a JavaScript sourcemap to ScalaJS-generated output files. For example:

-P:scalajs:mapSourceURI:file:/Users/daniel/Development/Scala/coop/->https://raw.githubusercontent.com/djspiewak/coop/b82b37f4da7b1cb831f32a2fda1150162e5b29d8/

This works just fine on Scala 2, but Dotty currently rejects this compiler option. It would be nice if some equivalent could be restored so that we avoid regressing functionality for users of JavaScript debuggers.

@sjrd sjrd self-assigned this Sep 13, 2020
@sjrd sjrd closed this as completed in c9533da Nov 22, 2020
sjrd added a commit that referenced this issue Nov 22, 2020
Fix #9783: Scala.js: Implement the `-scalajs-mapSourceURI` option.
@sjrd
Copy link
Member

sjrd commented Nov 22, 2020

This has now been implemented and will be part of the next release. However, the option name is slightly different:

  • In Scala 2: -P:scalajs:mapSourceURI:...
  • In Scala 3: -scalajs-mapSourceURI:...

The name had to be different. The -P option prefix is to give options to a compiler plugin, but in Scala 3, Scala.js is not a compiler plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants