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

stUseScalaJsDom := false also behaves like "stUseScalaJsStdLib := false" #372

Closed
armanbilge opened this issue Oct 17, 2021 · 3 comments
Closed

Comments

@armanbilge
Copy link
Contributor

In typelevel/fs2#2681 I wanted to remove the scalajs-dom dependency from the Node.js facade in fs2.

However, I was surprised that setting stUseScalaJsDom := false also swapped all the Scala.js standard library types for ST facade types. E.g. js.Error became std.Error, etc. I feel like this should be a separate option?

@armanbilge armanbilge changed the title stUseScalaJsDom := false also behaves like "stUseScalaJsStdLib := false" stUseScalaJsDom := false also behaves like "stUseScalaJsStdLib := false" Oct 17, 2021
@oyvindberg
Copy link
Collaborator

Hey there, thanks for the report.

I do agree that it's somewhat deceivingly named. I designed it as a switch between the ST/TS universe and the Scala.js universe, and it didn't really occur to me at all that it crossed library boundaries.

In fact some other Javascript types defined in Scala.js proper are unconditionally used for translation, you can see most of them ImportType.

I'd happily accept a PR which moves pairs of type definitions from ScalaJsDomNames to there.

Otherwise I'll get to it eventually, but it'll take some time due to me having much less time available.

@armanbilge
Copy link
Contributor Author

Thanks for the reply and the pointers! No worries at all, if I can carve out some time I'll try and figure this out and put together a PR.

@armanbilge
Copy link
Contributor Author

Thanks for fixing!!

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

No branches or pull requests

2 participants