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

Cross-build for Scala.js #202

Closed
milessabin opened this issue May 26, 2022 · 5 comments · Fixed by #409
Closed

Cross-build for Scala.js #202

milessabin opened this issue May 26, 2022 · 5 comments · Fixed by #409
Labels
enhancement New feature or request
Milestone

Comments

@milessabin
Copy link
Member

This won't work for the doobie/skunk modules, but it should be fine for the others, and it would be interesting to get other backends contributed from the node ecosystem.

@milessabin milessabin added the enhancement New feature or request label May 26, 2022
@milessabin milessabin added this to the 1.0.0 milestone May 26, 2022
@milessabin milessabin mentioned this issue May 26, 2022
22 tasks
@armanbilge
Copy link
Member

It is doable for skunk, skunk runs on Node.js :)

As I mentioned in #128 (comment), this should be very easy for the actual sources. The difficulty right now are that your tests spin up Docker images directly, which will be difficult to port. If you're willing to make a change, here's two strategies:

  • Setup the docker images externally, if possible. Skunk does this with Docker compose which is why it was easy to port its Node.js tests.
  • Explore using a different client such as whale-tail which cross-builds for JVM and Node.js.

@milessabin
Copy link
Member Author

We originally had the docker images external, and I felt that the move to test-containers was a definite improvement from a usability point of view. I'd be happy to consider an alternative specifically for js tests.

@alexcardell
Copy link

TestContainers does have support for setting up arbitrary containers docker-compose files.

There's also a testcontainers-node. Perhaps it's feasible to write some Scala.js testcontainers bindings to use the node/java docker-compose API depending on context?

@armanbilge
Copy link
Member

armanbilge commented Aug 10, 2022

@alexcardell thanks for chiming in. I mentioned there's already an existing pure Scala Docker client that cross-compiles for JVM and Node.js (and will cross-compile for Scala Native as well without additional work, once its dependencies are ported). So I think investing in that is the best long-term solution, rather trying to juggle different implementations for the different platforms (dealing with npm and maintaining bindings is not much fun).

https://github.com/davenverse/whale-tail

@armanbilge
Copy link
Member

This would benefit from #128 (comment).

@armanbilge armanbilge linked a pull request Jun 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants