sbt/notes/0.13.7.markdown

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

121 lines
7.7 KiB
Markdown
Raw Permalink Normal View History

2014-10-06 23:04:02 +02:00
2019-09-05 20:11:13 +02:00
[Cached-Resolution]: https://www.scala-sbt.org/0.13/docs/Cached-Resolution.html
2014-10-06 23:04:02 +02:00
[@cunei]: https://github.com/cunei
[@eed3si9n]: https://github.com/eed3si9n
[@gkossakowski]: https://github.com/gkossakowski
[@jsuereth]: https://github.com/jsuereth
[@ajozwik]: https://github.com/ajozwik
2014-11-19 07:53:59 +01:00
[@copumpkin]: https://github.com/copumpkin
2014-10-06 23:04:02 +02:00
[@Duhemm]: https://github.com/Duhemm
[@jedesah]: https://github.com/jedesah
2014-10-07 00:10:38 +02:00
[@rkrzewski]: https://github.com/rkrzewski
2014-10-06 23:04:02 +02:00
[@tmandke]: https://github.com/tmandke
[@topping]: https://github.com/topping
2014-10-07 08:38:07 +02:00
[@WarsawScala]: https://github.com/WarsawScala
[@kretes]: https://github.com/kretes
2014-10-06 23:04:02 +02:00
[1237]: https://github.com/sbt/sbt/issues/1237
[1430]: https://github.com/sbt/sbt/issues/1430
[1544]: https://github.com/sbt/sbt/issues/1544
2014-11-19 07:53:59 +01:00
[1563]: https://github.com/sbt/sbt/pull/1563
2014-10-06 23:04:02 +02:00
[1572]: https://github.com/sbt/sbt/pull/1572
[1573]: https://github.com/sbt/sbt/pull/1573
[1579]: https://github.com/sbt/sbt/pull/1579
[1584]: https://github.com/sbt/sbt/pull/1584
[1586]: https://github.com/sbt/sbt/pull/1586
[1589]: https://github.com/sbt/sbt/issues/1589
2014-11-19 07:53:59 +01:00
[1590]: https://github.com/sbt/sbt/pull/1590
2014-10-06 23:04:02 +02:00
[1591]: https://github.com/sbt/sbt/pull/1591
[1598]: https://github.com/sbt/sbt/issues/1598
[1600]: https://github.com/sbt/sbt/pull/1600
[1601]: https://github.com/sbt/sbt/pull/1601
[1602]: https://github.com/sbt/sbt/pull/1602
[1606]: https://github.com/sbt/sbt/issues/1606
[1607]: https://github.com/sbt/sbt/pull/1607
Spelling (#8028) * spelling: 1.x Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: aether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: anymore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: artifact Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: be Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: bridge Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: checksum Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: class loads Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: contra Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependencies Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependency Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: deriveds Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: describes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: early Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: enclosed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: evaluation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: excluding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: execution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: for Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: frequently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: green Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https://www Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: in-sourcing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: include Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: incompatible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: indefinitely Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: information Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: inputted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: just Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lastmodifiedtimes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: latest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: manifest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: miscellaneous Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: more Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: neither Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: never Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: opted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: outputting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: params Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: preceding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: presentation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: project Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: projects Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: protocol Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: related Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: representation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: res Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverlist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverset Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: returned Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sbt_version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: scalacheck Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sentinels Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separates Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: serves Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: should Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: significant Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: specifically Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: substitute Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: suppress Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: terminal Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: title Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: versions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: want Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: wanting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: sbt Cached Resolution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: Testing sbt plugins Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-02-04 07:11:28 +01:00
[1611]: https://github.com/sbt/sbt/issues/1611
2014-10-06 23:04:02 +02:00
[1618]: https://github.com/sbt/sbt/pull/1618
[1621]: https://github.com/sbt/sbt/pull/1621
[1631]: https://github.com/sbt/sbt/pull/1631
[1642]: https://github.com/sbt/sbt/pull/1642
2014-10-20 18:27:51 +02:00
[1683]: https://github.com/sbt/sbt/pull/1683
[1648]: https://github.com/sbt/sbt/pull/1648
2014-10-06 23:04:02 +02:00
### Fixes with compatibility implications
- Maven artifact dependencies will limit their transitive dependencies to `Compile` rather than *every configuration* if no `master` configuration is found. [#1586][1586] by [@jsuereth][@jsuereth]
2015-01-24 19:45:15 +01:00
- The new natural whitespace handling parser is unable to cope with certain classes of Scala syntax. In particular, top-level pattern matches, or multi-value definitions are no longer supported.
2014-10-25 00:52:12 +02:00
2014-11-19 07:57:28 +01:00
Here are examples:
val x, y = project // BAD
val x = project //
val y = project // GOOD
2014-10-06 23:04:02 +02:00
### Improvements
2014-10-07 08:38:07 +02:00
- Natural whitespace handling. See below. [#1606][1606] by [@rkrzewski][@rkrzewski], [@ajozwik][@ajozwik], and others at [@WarsawScala][@WarsawScala]
2014-10-06 23:04:02 +02:00
- Adds support for publishing to a custom Maven local repository. See below. [#1589][1589]/[#1600][1600] by [@topping][@topping]
- Adds circular dependency check. See below. [#1601][1601] by [@eed3si9n][@eed3si9n]
- Adds cached resolution (minigraph caching). See below. [#1631][1631] by [@eed3si9n][@eed3si9n]
- Allows the "-bin" Scala version suffix to specify a bincompat version. [#1573][1573] by [@cunei][@cunei]
- Adds support for publishing to file repositories specified in `~/.sbt/repositories`. [#1579][1579] by [@copumpkin][@copumpkin]
- Adds support for publishing to a Maven repository with `file` URLs. [#1618][1618] by [@jsuereth][@jsuereth]
- Don't hardcode existing relations in `TextAnalysisFormat`. [#1572][1572] by [@Duhemm][@Duhemm]
- Adds `developers` key. [#1590][1590] by [@jedesah][@jedesah]
- Will warn when none or multiple main classes detected. [#1648][1648] by [@kretes][@kretes]
2014-10-06 23:04:02 +02:00
### Bug fixes
- Fixes issues with specifying `scalaHome`/`scalaInstance` and running tests. [#1584][1584] by [@jsuereth][@jsuereth]
- Fixes StackOverflow error in dependencies extraction with macro and name hashing. [#1563][1563]/[#1642][1642]/[#1237][1237]/[#1544][1544] by [@Duhemm][@Duhemm]
- Fixes `set every`. [#1591][1591]/[#1430][1430] by [@cunei][@cunei]
- Ivy no longer silently flops to `HttpClient` resolver when httpclient is on the classpath. [#1602][1602] by [@jsuereth][@jsuereth]
- Backports Ivy fix to not throw exceptions when modules are evicted. [#1607][1607]/[#1598][1598] by [@jsuereth][@jsuereth]
- When resolving from a Maven repository, and unable to read `maven-metadata.xml` file (common given the divergence in
Maven 3 and Ivy 2), we attempt to use `LastModified` timestamp in lieu of "published" timestamp.
[#1611][1611]/[#1618][1618] by [@jsuereth][@jsuereth]
- Fixes NullPointerException when using `ChainResolver` and Maven repositories. [#1611][1611]/[#1618][1618] by [@jsuereth][@jsuereth]
- Fixes `Resolver`'s `url` method dropping `descriptorOptional` and `skipConsistencyCheck`. [#1621][1621] by [@tmandke][@tmandke]
2014-11-19 07:55:07 +01:00
- Revert `useLatestSnapshot` on `updateOptions` to default to `false`. Reverts chain resolver to previous behavior. [#1683][1683] by [@jsuereth][@jsuereth]
2014-10-06 23:04:02 +02:00
### Natural whitespace handling
Starting sbt 0.13.7, build.sbt will be parsed using a customized Scala parser. This eliminates the requirement to use blank line as the delimiter between each settings, and also allows blank lines to be inserted at arbitrary position within a block.
This feature can be disabled, if necessary, via the -Dsbt.parser.simple=true flag.
2014-10-07 08:38:07 +02:00
This feature was contributed by [Andrzej Jozwik (@ajozwik)](https://github.com/ajozwik), [Rafał Krzewski (@rkrzewski)][@rkrzewski] and others at [@WarsawScala][@WarsawScala] inspired by Typesafe's [@gkossakowski][@gkossakowski] organizing multiple [meetups](http://blog.japila.pl/2014/07/gkossakowski-on-warszawscala-about-how-to-patch-scalasbt/) and [hackathons](http://blog.japila.pl/2014/07/hacking-scalasbt-with-gkossakowski-on-warszawscala-meetup-in-javeo_eu/) on how to patch sbt with the focus on this blank line issue. Dziękujemy! [#1606][1606]
2014-10-06 23:04:02 +02:00
### Custom Maven local repository location
Maven local repository is now resolved from the first of:
- `<localRepository/>` element in `~/.m2/settings.xml`
- `<localRepository/>` element in `$M2_HOME/conf/settings.xml`, or
- the default of `~/.m2/repository` if neither of those configuration elements exist
If more Maven settings are required to be recovered, the proper thing to do is merge the two possible `settings.xml` files, then query against the element path of the merge. This code avoids the merge by checking sequentially.
[#1589][1589]/[#1600][1600] by [@topping][@topping]
### Circular dependency
By default circular dependencies are warned, but they do not halt the dependency resolution. Using the following setting, circular dependencies can be treated as an error.
updateOptions := updateOptions.value.withCircularDependencyLevel(CircularDependencyLevel.Error)
[#1601][1601] by [@eed3si9n][@eed3si9n]
### Cached resolution (minigraph caching)
2014-11-19 07:25:52 +01:00
sbt 0.13.7 adds a new **experimental** update option called *cached resolution*, which replaces consolidated resolution:
2014-10-06 23:04:02 +02:00
updateOptions := updateOptions.value.withCachedResolution(true)
2015-01-24 19:45:15 +01:00
Unlike consolidated resolution, which only consolidated subprojects with identical dependency graph, cached resolution create an artificial graph for each direct dependency (minigraph) for all subprojects, resolves them independently, saves them into json file, and stitches the minigraphs together.
2014-10-06 23:04:02 +02:00
Once the minigraphs are resolved and saved as files, dependency resolution turns into a matter of loading json file from the second run onwards, which should complete in a matter of seconds even for large projects. Also, because the files are saved under a global `~/.sbt/0.13/dependency` (or what's specified by `sbt.dependency.base` flag), the resolution result is shared across all builds.
2014-11-19 07:25:52 +01:00
Breaking graphs into minigraphs allows partial resolution results to be shared, which scales better for subprojects with similar but slightly different dependencies, and also for making small changes to the dependencies graph over time. See [documentation on cached resolution][Cached-Resolution] for more details.
2014-10-06 23:04:02 +02:00
[#1631][1631] by [@eed3si9n][@eed3si9n]