[sbt 1.0] sbt.Build => sbt.internal.BuildDef#2524
Conversation
sbt.Load => sbt.internal.Load
|
I'm in the process of upgrading the Scala.js build, and it wasn't hard. But it would be great if someone would create an automated tool for translation to speed up the process. 👍 |
I haven't seen anyone address this particular remark yet so I feel that I should. Hinting at a change at a conference is not a satisfactory way of letting your community know that things are changing significantly. Not all of us go to those conferences. Those that do may not attend a session where this is hinted at. Of those that do probably only a percentage catch the actual hint and fully internalize it. If you've truly known about this for a year, sbt 0.13.x should have started surfacing a deprecation warning when it was building a Sorry if this comes off a bit rude, but I'm really quite annoyed that hasn't been done anytime in the last year as far as I can tell. EDIT: Just realized one of those links wasn't a conference but a ML post. Which... okay that's more reasonable. But I do still feel there should have been a deprecation warning. |
|
@farmdawgnation You're totally right about deprecation. The next sbt 0.13.x will have the warning (#2530), and it will be some time until sbt 1.0.x comes out. |
|
I like the decision. We introduced this in our company and people where starting to actually like sbt, contributing to our company wide autoplugins, and reducing the build definitions in our projects from multipe A migration is straightforward. You put your logic and default settings into autoplugins (e.g. http calls to jenkins for latest versions, nexus/artifactory credentials, and so on). Then you create a Great job @eed3si9n / @dwijnand and the rest of the sbt community :) |
|
I really feel this is the wrong direction. How is it that Scala, in its pure form, is apparently well suited to do everything, aside from describing its own builds? The .sbt layer is too clever by half, and it's a shame to see the team doubling down on it. I don't think I'm being hyperbolic by saying that this is the sort of thing that propagates the reputation of the language and ecosystem not being accessible. Imagine you've been really sold on the benefits of Scala, and you want to use it on a new service you're writing. SBT is more or less mandatory to anybody starting a serious Scala project, and it's really difficult to avoid immediately being confronted by a whole new world of unfamiliar concepts and meta-level thinking. It's super awkward, because you have to simultaneously comprehend your build on the Scala value level, the Scala type level, and the SBT mutable engine level. The fact that you have to learn As a genuine question, what's the core problem that I hope the maintainers don't take this the wrong way, because it is meant as constructive criticisms, but what I'm describing here is a microcosm of the challenges the Scala ecosystem faces. The core projects are largely written by experts, and I think sometimes it's difficult for experts to look at their own constructs through the eyes of a non-expert. There many parts of the ecosystem where this is less necessary, but I would argue that as central as SBT is, this is a place where that principle should really be applied. |
|
@acjay Thanks for writing this.
We are in agreement on this point. The recent history of sbt, especially during sbt 0.13, has been largely driven by making the shock of sbt 0.10 more palatable through auto plugins,
Once someone starts writing their build definition, they need to face the fact that build DSL is not Scala, and learn it as a separate thing, like regex or CSS. Tasks are dependency graph of calculations that gets executed in parallel. The earlier we can convey that build DSL is not Scala (but it can call Scala, similar to Scala is not Java), the more we can avoid the confusion of why
Like snowboarding, the first day is going to suck, and the second day it gets better. I don't think you have to comprehend all the inner workings of sbt on day 1, and one should be able to get started on
It's a shorter form of writing the build DSL. Take a look at the following addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.2")It's shorter because it automatically imports the necessary names and implicits, and auto plugin also allows the plugin authors to introduce custom names and settings into the build. This is more copy-pastable than People often poke fun about "simple" part of sbt (Insert simple != easy). We have a redundant functionality called
As commented above, the removal of There are plugins that depend on the other plugins. When this happens the setting sequences must be loaded in some specific order, otherwise the plugins would break. From a build user who just wants to compile CoffeeScript how the plugins are related is an incidental complexity. Auto plugins solve this by the build users naming the plugins, and sbt ordering the settings based on the plugin dependencies. |
|
I don't understand how removing I challenge your claim that The only way to fix rogue usages of |
|
@fommil I forgot to mention the obvious issue with |
|
Nobody likes to see "their" feature or code path deprecated, and I personally am a big fan and proponent of Build.scala. But strictly from a maintainability standpoint, I don't think any open source project has the bandwidth to cater to a minority of users, nor should they. So I tried to find some sort of proxy for usage metrics, and the results (below) surprised me:
I think these searches are representative in that they count roughly similar things, and the data surprised me. I probably would not be using Build.scala today if there were some usage metrics available to help me choose what the community has de-facto voted for, and for me the schism between Build.scala and build.sbt is more confusing than it would have been to learn the build DSL in the first place. It might be worthwhile to consider a |
|
I'm not using |
A small step toward sbt 1.0 readiness. See:
sbt/sbt#2524
|
For others concerned about this like I was, this is much less of a deal than I thought it was going to be. If you haven't seen this PR for Scala.JS I suggest you take a look. You basically just turn |
+ see sbt/sbt#2524 + use sbt-sonatype plugin + update scalastyle-sbt-plugin 0.8.0, sbt-pgp 1.0.0 + update scala 2.11.8, mokito 1.10.19, scalatest 2.2.6, joda-time 2.9.3, joda-convert 1.8.1, scala-xml 1.0.5 + remove build setting `javacOptions`. We have no .java files + remove Scoverage's `lazy val LocalTest = config("local") extend Test`
This change removes
sbt.Buildfrom the common build classpath there by removingBuild.scaladialect of the build definition. Most scripted tests are ported over to build.sbt.before (a typical
project/Build.scala)after (sbt 0.13 multi-project
build.sbt)note
As you can see,
project/Build.scalaandbuild.sbtare not that different.The build users can still define classes and objects in
project/*.scalafor instance to organize dependencies. I'm only deprecating theBuild.scalastyle of build definitions./review @dwijnand, @jsuereth, @Duhemm