I wrote up sbt 1.0 roadmap and beta-1 post. Please check it out.
Also we pushed out sbt 1.0.0-M5 today, which is the first beta released.
We’d be happy to get your feedback on the sbt 1.0 roadmap on this thread.
I wrote up sbt 1.0 roadmap and beta-1 post. Please check it out.
Also we pushed out sbt 1.0.0-M5 today, which is the first beta released.
We’d be happy to get your feedback on the sbt 1.0 roadmap on this thread.
I second that. CBT equally encourages lots of well-defined small modules and like everyone else is equally affected by zincs overhead.
I thought that ship sailed long ago? .value
is a macro, alternatives are deprecated in 0.13 and dropped in 1.0. Same for using .scala
over build.sbt
. Or do I miss something?
Would you be fine with creating a new JAR replacing the old one? I’m not sure there’s another way to “slightly modify a JAR”—at least not when using JarOutputStream
. I guess input libraries are loaded through ClassLoaders, so this change would presumably require more classloader invalidation… though it might well work.
Either way: such an idea, if it makes sense, would probably require its own issue in the SBT tracker.
Yea, it would be a new jar rather than a mutation of an old jar. I meant “slightly modified” in the sense that rather than choosing to invalidate everything that depends on a jar when it changes, you would invalidate based on the fingerprints of classes inside the jar.
Great news.
I would like to see https://github.com/sbt/sbt/issues/2310 move forward. I assume @sjrd has some input for this as well.
As a community we should have a standard sbt build setup, which people can use to start their projects. This should IMHO contain the following:
Another feature I miss with sbt (or maybe just haven’t found yet) is being able to share a bill of materials (BOM for short). This is a common pattern in the maven community (see https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html).
The idea is that projects provide a configuration (pom.xml), which explicitly manages the versions which a certain library depends on. This bill of materials can then be used by the project which uses the library.
For example my project ScalaWebTest depends on ScalaTest, Selenium and HtmlUnit. Chances are the project using ScalaWebTest already has a transitive dependency on HtmlUnit. In this case it is important for me, that I have an easy way to tell my users, which dependency versions should be managed in his project. For maven users, I can do this by providing a bill of materials. See http://www.scalawebtest.org/download.html#maven
I suggest to make use of the Dreyfus model when improving the SBT documentation. The Dreyfus model shows how people have different needs depending on their level of a mastering a skill. “Pragmatic thinking and learing” by Andy Hunt (https://pragprog.com/book/ahptl/pragmatic-thinking-and-learning - see chapter 2 Journey from Novice to Expert) puts this in to perspective of teaching IT skills.
(for those wondering about the multiple posts - max. 2 links for new user )
oh, the other huge thing (sbt 1.0+ or a 0.14 on scala 2.12) would be to use NIO everywhere. So many performance benefits if used correctly, especially on Windows and no more FS polling.
Hello @jvican .
For my Scala Projects i currently use Gradle Wrapper with the Scala Plugin.
Now i decide to use sbt.
Some starting points I missed from my point of view:
sbt installation and first start / load of sbt with a Company Artifactory: Here I would like to define the Company Artifactory a) for first sbt start and b) for Project Dependencies (this is already documented : How can I do that ?
I missed a minimal valid .gitignore Definition for a sbt Project (single and multi build). I been confused about the Details in the ‘project’ Subdirectory and it’s content.
Compare the Gradle Wrapper with sbt: Does work the local installed sbt ‘same prinzip’ as the Gradle Wrapper?
As a sbt Beginner
Röbi
Resolution of this issue would be most welcome:
I have been converting a multiproject Ant build to a multiproject Sbt build.
Recently the release for Sbt for Linux on Ubuntu was broken for some time. In my mixed build environment I had BuildBot for CS/CI and Sbt for build and package. My MacOS build machines were up and running but my Ubuntu machines were left sidelined without a functioning Sbt release. References to Java9 had escaped in the packages available to me. From last January, 2017 until just recently, there has no sbt build that I downloaded, that would correct the problem.
I ponder the fact that I am migrating from Ant to Sbt as my build tool, and the Build Tool itself is not being managed successfully. The recovery from the broken release was not RESPONSIVE.
What version of Ubuntu are you using? How did you install sbt? Which version of sbt are you using?
sbt 0.13.13 installed via apt from http://dl.bintray.com/sbt/debian/ on a Kubuntu 16.10 works like a charm for me.
I have been converting a multi-project Ant build to a multi-project Sbt build.
First off, the size of the build file is reduced. Classpath management is very transparent compared with Ant.
Task execution is so much easier in Sbt. Compile is part of the Sbt DSL.In Ant the tedium of the markup and the amount of boilerplate required make Sbt the clear winner
Migrating Junit tests wasn’t as easy as one would expect. Not due to Sbt, but due to FixedOrder annotations having no effect. My solution was brute force, run each test separately. The command for the BuildBot worker to execute becomes simply, sbt < sbt.cmds. Don’t fight it, run your sbt from a file of commands.
Overall, I am pleased with Sbt.
It is not a problem for me now. This was a known issue, I discovered other mentioning it.
I now have a 6 host build farm and Sbt is the build mechanism.
I’m not hacking the SBT internals or a plugin myself, but seems like sbt needs to support a better integration test framework than scripted. Might the rework in 1.0 and server both benefit and make possible a richer test framework? A framework that would be less tricky but also more performant. This would seem like a sound investment for the plugin ecosystem as well as the sbt core.
I’ve suggested putting effort on a better test framework. Seems like now is a good time given the 1.0 and server development.
I agree with @fommil; The most important thing for sbt is migration to Scala 2.12 (or Scala 2.11). As we will be late for supporting the latest version of Scala, the more sbt plugin authors will lose the opportunity to migrate their sbt plugins, because we will forget about the implementation details as time goes. Cross-compilation with Scala 2.10 is an option, but I think it’s acceptable even if sbt only supports Scala 2.12, since we are already bearing with sbt that can only use Scala 2.10 plugins.
Another thing I need to see the improvement is reloading time of project configurations; when I modify a library dependency, it usually takes 30 sec or more until my IDE (e.g., IntelliJ IDEA) can start re-configure the project because it needs to wait for the completion of sbt reload task. sbt-coursier plugin helps improving the download speed of dependencies, but this long turn-around time of sbt makes difficult to configure projects.
I can’t stand the new feature in 0.13.15 that throws up warnings if you want to run SBT without keeping that VM around permanently. I’m not aware of any other build tool that won’t let you execute a build from the command line without a mandatory, permanently enabled warning that you should start up the build system in daemon mode instead.
I understand that you want to nudge people toward running the console to avoid the extra costs of spinning up a JVM. IMHO, the current mechanism is a repeated, aggressive shove and not a nudge. Putting message like this in the docs, or showing this message once the very first time you use sbt on a machine would be reasonable. Showing it every single time with no configuration option to disable it will ensure that I stay on 0.13.13.
My main pain points with SBT
Setting
s when we can use plain val
, why are we dealing with initialization order when we already have lazy
in place). Why do we have Task
when Scala already has an existing construct (i.e. def
).sbt
scriptsconfig
is based off how maven does things)libraryDependencies
and some set versions) or incredibly complex builds usually created by authors who understand sbt very well (i.e. https://github.com/scala-android/sbt-android), but for the middle ground (where most users fall) it falls short in many areas-Yclosure-elim
if you happen to be using 2.11 but if you are using 2.12 then opt:l:project
makes sense. Having default flags for the current project with the current Scala version context in mind would prevent needing stuff like https://github.com/knutwalker/sbt-knutwalker
At the risk of sounding sensationalist, at least where I work SBT has gotten so bad that coworkers have either given up working on it (which usually means the SBT related work gets delegated to someone who has some SBT experience) or they do stuff like copy and paste code around which creates entirely different set of problems. I haven’t really seen this kind of problem with other build tools. Its gotten bad enough, that even for fairly simple use cases (such as a code formatter) have resorted to using SBT for only its interface, i.e. see http://scalameta.org/scalafmt/#sbt
I don’t really have high hopes of SBT fixing the issues I have described because they appear to be very fundamental, in fact CTB seems to address almost all of the issues. I do like the approach of modularizing SBT more, because at least it makes it much easier for alternative build tools to arise and fix said problems.