tindzk / seed

Build tool for Scala projects
https://tindzk.github.io/seed/
Apache License 2.0
238 stars 13 forks source link

Quarkus integration #76

Open PhilAndrew opened 4 years ago

PhilAndrew commented 4 years ago

I would like integration with Quarkus https://quarkus.io/

Quarkus allows for fast reload of classes and a whole lot of features I would like seed to exhibit. I suspect this issue maybe closed as this could be a separate github project, but I like to ask first. It may not be desired by your project. I like some of the declarative features of Quarkus.

tindzk commented 4 years ago

Thanks for the suggestion! Creating native executables using GraalVM is planned.

I am not familiar with Quarkus, unfortunately. The main feature appears to be live reloading of classes. How does it compare to DCEVM?

PhilAndrew commented 4 years ago

I have a book on Quarkus, let me read the book and work out why I like it :) (or I should say, come back with reasons)

PhilAndrew commented 4 years ago

I really want live reloading. How to do with this, use DCEVM? I have used it before but not on seed. Live reload with your ScalaJS trigger would be useful.

http://hotswapagent.org/

http://dcevm.github.io/ https://github.com/dcevm/dcevm

tindzk commented 4 years ago

I managed to get it to work with an older Bloop version two years ago, but in a recent release, class files started to be written to unique folders. Otherwise you have done this:

# Terminal 1: Continuously build project
seed build --watch example

# Terminal 2: Run main class with DCEVM enabled
JAVA_TOOL_OPTIONS="-XXaltjvm=dcevm -javaagent:/path/to/hotswap-agent.jar" bloop run example

In my case, the first command wrote the class files to /tmp/build-dcevm/bloop/bloop-internal-classes/example-6P2vxtl9QjGGuCgBFSQ8wg==, whereas the second one used a different path: /tmp/build-dcevm/bloop/bloop-bsp-clients-classes/example-bloop-21r1tSAdRkONeSDCaa_UqA==/

If the target path for class files could be hard-coded in Bloop, DCEVM would be already supported.

Furthermore, if the JVM options could be specified in the Bloop configuration file, then we can shorten the second command to seed run example. Unfortunately, environment variables are not passed on to the JVM process when using BSP, so you still have to use the Bloop CLI for now.

Feel free to report these issues on the Bloop bug tracker.