-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add the ability to remap EsModule imports at link time #2737
Conversation
One thing this made me realise is that we never bumped |
modules/integration/src/test/scala/scala/cli/integration/RunScalaJsTestDefinitions.scala
Outdated
Show resolved
Hide resolved
Can you point me at where you're trying to introspect, which prints don't show?
a wild guess is that you are printing on os.proc(...).call(cwd = root, stdout = os.Inherit) as |
beyond the above, I'd recommend debugging the launcher directly, instead of printing stuff in the integration tests. ./mill -i integration.test.jvm 'scala.cli.integration.RunTests213.remap imports' --debug
# (...)
# --debug option has been passed. Listening for transport dt_socket at address: 5005 |
Yes. ./mill -i generate-reference-doc.run Also, you may want to rebase on top of |
@Gedochao @armanbilge This actually ... works ... to my satisfaction. The happy path works well. I have a question on error messaging, which is that if I (deliberately) break it, for example by entering a bad file path to my importmap, it produces the error message I'd expect, but it's hidden at the top of the error stack, above scala-cli help. My eyeballs are where the green line is, but the message I need, is where the red line is. Given that I'm naively throwing an exception, could I be engaging with scala-cli's error handling the wrong way? |
@Quafadas Rather than throwing an exception, you need to return a |
|
./mill -i __.fix you need this to satisfy the |
3dd2134
to
feea21d
Compare
783403f
to
c06c63a
Compare
modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala
Outdated
Show resolved
Hide resolved
modules/cli/src/main/scala/scala/cli/commands/shared/ScalaJsOptions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/RunScalaJsTestDefinitions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/RunScalaJsTestDefinitions.scala
Outdated
Show resolved
Hide resolved
modules/integration/src/test/scala/scala/cli/integration/RunScalaJsTestDefinitions.scala
Outdated
Show resolved
Hide resolved
…c for import file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
WIP is a rather kind description. A cry for help, perhaps.
This attempts to follow up on VirtusLab/scala-js-cli#47, and close #2698 - i.e. introduce a using directive and / or command line option, to enable the work done in scala-js-cli.
This introduces a failing test, which I can run with;
./mill -i 'integration.test' 'scala.cli.integration.RunTests213.remap imports'
My current headscratcher, is that I don't seem to be able to modify the behaviour of scala-cli itself though. I've liberally put some printlns everywhere - which aren't printed. So I think I'm suffering from some sort of new contributor syndrome.
Would anyone have a hint, on why the intregration test, could be ignoring my attempts to introspect it?