4 ms·
Obligatory "did you try running sbt ~ compile before you started complaining about the compile times" post. It's amazing how the tools for faster turnaround ti
by mark242 10y ago
Obligatory "did you try running sbt ~ compile before you started complaining about the compile times" post.
It's amazing how the tools for faster turnaround times exist-- the one thing the Scala community needs to do a better job of is clear, opinionated documentation.
Also -- https://github.com/scala-native/scala-native https://github.com/scala-native/scala-native -- watch that space.
- tylerpachal 10y agoCould you explain this a little bit? I am just getting into Scala, usually I use `sbt run` and `sbt test` while I am working, then `sbt dist` to package my production app. What does `sbt ~ compile` do ?
- deleted 10y ago[deleted]
- joshlemer 10y agoIf you run `~` before any command, sbt watches the directory for any source changes, and on detecting source changes, redoes the command. So `sbt ~compile` will re-compile any new sources as soon as they are saved.
- jpliska 10y agoThe use of the ~ here illustrates the problem in the scala world: a lot of surprising bells and whistles. Why not call it watch instead of ~?
- justinhj 10y agoOr just use IntelliJ and you can reload classes while your program is running if you want. Sbt is a very powerful tool but it's not written with readability for new users in mind.
- Sphax 10y agoWait, how does that help build time exactly ? It may help with the perceived build time, but your CI builds are still taking the same (long) time.
- floatboth 10y agoCI, sure, but on dev machines this means you're not throwing away the JVM and restarting it, reloading all the classes etc. on every build
- deleted 10y ago[deleted]
- jiaweihli 10y agoYes, first thing that crossed my mind. Scala is a very deep language, it was by far the language that took me the longest to learn.