7 ms·
Not directly related, but: do the world a favor and build a new SBT! This <<= one += is a bit -> """strange""" .
by salex89 10y ago
Not directly related, but: do the world a favor and build a new SBT! This <<= one += is a bit -> """strange""" .
- evacchi 10y agoStrongly agree. SBT really is puzzling and (IMO) overcomplicated. Someone is working on an experimental alternative called CBT which is pure Scala (as in: less DSL like syntax)
- imtringued 10y agoI'm not even sure why the acronym stands for simple build tool.
- evacchi 10y agoI think they refitted the acronym into "Scala Build Tool" a few years ago
- tycondryus 10y agoindeed, they did!
- agumonkey 10y agoWhat was the original meaning then ? sluggish bloat transducer ?
- choward 10y agoSucks big time
- deleted 10y ago[deleted]
- skrebbel 10y agoI'm bummed that CBT doesn't stand for "Complex Build Tool"
- cvogt 10y agoHi there. I am that "someone". CBT is coming along very nicely. It is growing into a nice little community. We are working on getting the last bugs out and establishing the basic range of important plugins right now https://github.com/cvogt/cbt/ https://github.com/cvogt/cbt/ CBT is very developer friendly, fast, simple, easy to use. Join us on gitter https://gitter.im/cvogt/cbt https://gitter.im/cvogt/cbt or check out my Scala Days talk about it :) https://www.youtube.com/watch?v=5COKEp7ItZk https://www.youtube.com/watch?v=5COKEp7ItZk
- Cthulhu_ 10y agoIIRC you can replace SBT with more Java-like tools like Maven (if you prefer xml) or Gradle (if you prefer... Actually iirc gradle is ambiguous about language these days).
- salex89 10y agoIn my experience, to some degree. If you are using Play, for example, the Gradle plugin is currently held on Play 2.3. Play 2.4 is experimental, 2.5 is nowhere to be seen.
- Nullabillity 10y agoThese days, you only need to use 3 of those operators: := for assignment, += for adding one item, and ++= for adding multiple. := is a bit weird since you can't override `=`, but the other two are exactly the same as you'd use with the standard collections library.
- salex89 10y agoIt's not only about the operators. The whole tools is not really straightforward. A great part of the time I just copy some magical strings into the build.sbt and sometimes it actually works. I tried learning it with understanding, believe me.
- cryptos 10y agoCan second this. SBT is terrible. It gets even worse in combination with IntelliJ and complex project setups.
- johncolanduoni 10y agoIf this is ever going to happen I feel like some level of SBT plugin compatibility may be a good call. I really dislike SBT, but a lot of the plugins are top-notch (sbt-android and sbt-android-protify are two great examples).
- doikor 10y agoAfter learning sbt I've found it to be one of my favorite build tools out there. The fact that the build.sbt file is basically just a dialect of Scala allows for some very complex build jobs to be done easily. Also the simplifications coming with sbt 1.0 like removing the Build.scala and dropping support for multiple build.sbt files makes it a bit cleaner in my mind at least. Before everything was spread around in multiple files (and possible 2 different build definition styles with the .sbt and .scala files) instead now everything is in pretty much one single file with a clean enough syntax for anyone to learn. (as someone said you only really need to know :=, += and +== of which the latter 2 function the same as they do in the standard lib for collections) edit: Sorry was wrong about the multiple build.sbt support. Its still in but working with a single build.sbt has been made easier over the 0.13.x versions and we reverted all of our multi project builds into that and I just assumed it was being dropped (We also had a lot of Build.scala stuff so I guess i got mixed)
- benjaminjackman 10y agoDo you have a link for dropping support for multiple build.sbt files? I can find a reference to it and I'll have to adjust my project if that is the case
- joostdevries 10y agoI recently wrote an sbt plugin. And I found that sbt became much easier after learning the core concepts. The book 'Sbt in Action' explains it very well and also contains a great comparison of build tools; what they historically brought to the table.
- kbenson 10y agoLike many things, there's a trade-off between up-front learning cost to gain expressiveness and usefulness later, and lower up-front cost at the expense of explicit verbosity later.
- choward 10y agoI shouldn't have to read a book in order to understand a "simple" build tool. And I'm for damn sure not paying for it. Make something overly complex and sells a book for it. Great business model!!!
- jbooth 10y agoJust use Maven. It will be the lowest maintenance cost over time for your project. Nothing else matters, it's a frickin build system -- get it working and move on.
- heartsucker 10y agoMaven is an archaic, verbose nightmare compared to SBT. SBT can be annoyingly esoteric at times, but even for the simplest thing like "add these JARs and compile," SBT wins over Maven, no question.
- deleted 10y ago[deleted]
- lmm 10y agoNot true. Maven may be verbose, but <groupId>com.foocorp</groupId> <artifactId>foo</artifactId> <version>1.2</version> is far less archaic and more understandable than "com.foocorp" % "foo" % "1.2"
- pfn 10y agoactually, the latter is far more readable without markup making my eyes bleed. I generally prefer gradle's method of 'com.foocorp:foo:1.2' but that isn't acceptable statically. scala string interpolators could make it a thing, though.
- harveywi 10y agoUnfortunately, we have things like this in the mix... libraryDependencies += "com.lihaoyi" %% "scalatags" % "0.4.3" libraryDependencies += "com.lihaoyi" %%% "scalatags" % "0.4.3"
- virtualwhys 10y agoTo be fair you'd only be using one or the other, `%%` for jvm-only, and `%%%` for cross platform jvm/js builds. Far and away the biggest blocker to learning sbt is the shaky IDE support for the build project. Apparently that's coming up next in 1.0; will be nice to click through to source from sbt build files and instantly grok what X symbol means. Have wasted a lot of time over the years slogging through documentation...
- dlandis 10y agoI agree. As a casual Scala developer I feel like SBT has always been a disaster. Does anyone know why Gradle isn't more popular for Scala development? I've had generally very positive experiences using it with Java.
- pfn 10y agobecause gradle is slow, and the dsl is a disaster compared to sbt
- Nullabillity 10y agoSBT's IDE support isn't great by any means, but it's way ahead of what I've ever seen with Gradle.