Files
sbt/notes/0.13.7.markdown
Josh Soref 613eb86447 Spelling (#8028)
* spelling: 1.x

Signed-off-by: Josh Soref <[email protected]>

* spelling: a

Signed-off-by: Josh Soref <[email protected]>

* spelling: aether

Signed-off-by: Josh Soref <[email protected]>

* spelling: anymore

Signed-off-by: Josh Soref <[email protected]>

* spelling: artifact

Signed-off-by: Josh Soref <[email protected]>

* spelling: available

Signed-off-by: Josh Soref <[email protected]>

* spelling: be

Signed-off-by: Josh Soref <[email protected]>

* spelling: bridge

Signed-off-by: Josh Soref <[email protected]>

* spelling: cannot

Signed-off-by: Josh Soref <[email protected]>

* spelling: case-insensitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: checksum

Signed-off-by: Josh Soref <[email protected]>

* spelling: class loads

Signed-off-by: Josh Soref <[email protected]>

* spelling: contra

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependencies

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependency

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependent

Signed-off-by: Josh Soref <[email protected]>

* spelling: deriveds

Signed-off-by: Josh Soref <[email protected]>

* spelling: describes

Signed-off-by: Josh Soref <[email protected]>

* spelling: early

Signed-off-by: Josh Soref <[email protected]>

* spelling: enclosed

Signed-off-by: Josh Soref <[email protected]>

* spelling: evaluation

Signed-off-by: Josh Soref <[email protected]>

* spelling: excluding

Signed-off-by: Josh Soref <[email protected]>

* spelling: execution

Signed-off-by: Josh Soref <[email protected]>

* spelling: for

Signed-off-by: Josh Soref <[email protected]>

* spelling: frequently

Signed-off-by: Josh Soref <[email protected]>

* spelling: github

Signed-off-by: Josh Soref <[email protected]>

* spelling: green

Signed-off-by: Josh Soref <[email protected]>

* spelling: https://www

Signed-off-by: Josh Soref <[email protected]>

* spelling: https

Signed-off-by: Josh Soref <[email protected]>

* spelling: in-sourcing

Signed-off-by: Josh Soref <[email protected]>

* spelling: include

Signed-off-by: Josh Soref <[email protected]>

* spelling: incompatible

Signed-off-by: Josh Soref <[email protected]>

* spelling: indefinitely

Signed-off-by: Josh Soref <[email protected]>

* spelling: information

Signed-off-by: Josh Soref <[email protected]>

* spelling: inputted

Signed-off-by: Josh Soref <[email protected]>

* spelling: just

Signed-off-by: Josh Soref <[email protected]>

* spelling: lastmodifiedtimes

Signed-off-by: Josh Soref <[email protected]>

* spelling: latest

Signed-off-by: Josh Soref <[email protected]>

* spelling: manifest

Signed-off-by: Josh Soref <[email protected]>

* spelling: miscellaneous

Signed-off-by: Josh Soref <[email protected]>

* spelling: more

Signed-off-by: Josh Soref <[email protected]>

* spelling: neither

Signed-off-by: Josh Soref <[email protected]>

* spelling: never

Signed-off-by: Josh Soref <[email protected]>

* spelling: nonexistent

Signed-off-by: Josh Soref <[email protected]>

* spelling: opted

Signed-off-by: Josh Soref <[email protected]>

* spelling: outputting

Signed-off-by: Josh Soref <[email protected]>

* spelling: params

Signed-off-by: Josh Soref <[email protected]>

* spelling: performance

Signed-off-by: Josh Soref <[email protected]>

* spelling: preceding

Signed-off-by: Josh Soref <[email protected]>

* spelling: presentation

Signed-off-by: Josh Soref <[email protected]>

* spelling: project

Signed-off-by: Josh Soref <[email protected]>

* spelling: projects

Signed-off-by: Josh Soref <[email protected]>

* spelling: protocol

Signed-off-by: Josh Soref <[email protected]>

* spelling: related

Signed-off-by: Josh Soref <[email protected]>

* spelling: representation

Signed-off-by: Josh Soref <[email protected]>

* spelling: res

Signed-off-by: Josh Soref <[email protected]>

* spelling: resolverlist

Signed-off-by: Josh Soref <[email protected]>

* spelling: resolverset

Signed-off-by: Josh Soref <[email protected]>

* spelling: response

Signed-off-by: Josh Soref <[email protected]>

* spelling: returned

Signed-off-by: Josh Soref <[email protected]>

* spelling: sbt_version

Signed-off-by: Josh Soref <[email protected]>

* spelling: scalacheck

Signed-off-by: Josh Soref <[email protected]>

* spelling: sentinels

Signed-off-by: Josh Soref <[email protected]>

* spelling: separates

Signed-off-by: Josh Soref <[email protected]>

* spelling: serves

Signed-off-by: Josh Soref <[email protected]>

* spelling: should

Signed-off-by: Josh Soref <[email protected]>

* spelling: significant

Signed-off-by: Josh Soref <[email protected]>

* spelling: specifically

Signed-off-by: Josh Soref <[email protected]>

* spelling: substitute

Signed-off-by: Josh Soref <[email protected]>

* spelling: suppress

Signed-off-by: Josh Soref <[email protected]>

* spelling: terminal

Signed-off-by: Josh Soref <[email protected]>

* spelling: the

Signed-off-by: Josh Soref <[email protected]>

* spelling: title

Signed-off-by: Josh Soref <[email protected]>

* spelling: transitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: version

Signed-off-by: Josh Soref <[email protected]>

* spelling: versions

Signed-off-by: Josh Soref <[email protected]>

* spelling: want

Signed-off-by: Josh Soref <[email protected]>

* spelling: wanting

Signed-off-by: Josh Soref <[email protected]>

* spelling: whether

Signed-off-by: Josh Soref <[email protected]>

* link: sbt Cached Resolution

Signed-off-by: Josh Soref <[email protected]>

* link: Testing sbt plugins

Signed-off-by: Josh Soref <[email protected]>

---------

Signed-off-by: Josh Soref <[email protected]>
2025-02-04 01:11:28 -05:00

7.7 KiB

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 by @jsuereth
  • 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.

Here are examples:

val x, y = project // BAD
val x = project    // 
val y = project    //  GOOD

Improvements

  • Natural whitespace handling. See below. #1606 by @rkrzewski, @ajozwik, and others at @WarsawScala
  • Adds support for publishing to a custom Maven local repository. See below. #1589/#1600 by @topping
  • Adds circular dependency check. See below. #1601 by @eed3si9n
  • Adds cached resolution (minigraph caching). See below. #1631 by @eed3si9n
  • Allows the "-bin" Scala version suffix to specify a bincompat version. #1573 by @cunei
  • Adds support for publishing to file repositories specified in ~/.sbt/repositories. #1579 by @copumpkin
  • Adds support for publishing to a Maven repository with file URLs. #1618 by @jsuereth
  • Don't hardcode existing relations in TextAnalysisFormat. #1572 by @Duhemm
  • Adds developers key. #1590 by @jedesah
  • Will warn when none or multiple main classes detected. #1648 by @kretes

Bug fixes

  • Fixes issues with specifying scalaHome/scalaInstance and running tests. #1584 by @jsuereth
  • Fixes StackOverflow error in dependencies extraction with macro and name hashing. #1563/#1642/#1237/#1544 by @Duhemm
  • Fixes set every. #1591/#1430 by @cunei
  • Ivy no longer silently flops to HttpClient resolver when httpclient is on the classpath. #1602 by @jsuereth
  • Backports Ivy fix to not throw exceptions when modules are evicted. #1607/#1598 by @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/#1618 by @jsuereth
  • Fixes NullPointerException when using ChainResolver and Maven repositories. #1611/#1618 by @jsuereth
  • Fixes Resolver's url method dropping descriptorOptional and skipConsistencyCheck. #1621 by @tmandke
  • Revert useLatestSnapshot on updateOptions to default to false. Reverts chain resolver to previous behavior. #1683 by @jsuereth

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.

This feature was contributed by Andrzej Jozwik (@ajozwik), Rafał Krzewski (@rkrzewski) and others at @WarsawScala inspired by Typesafe's @gkossakowski organizing multiple meetups and hackathons on how to patch sbt with the focus on this blank line issue. Dziękujemy! #1606

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/#1600 by @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 by @eed3si9n

Cached resolution (minigraph caching)

sbt 0.13.7 adds a new experimental update option called cached resolution, which replaces consolidated resolution:

updateOptions := updateOptions.value.withCachedResolution(true)

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.

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.

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 for more details.

#1631 by @eed3si9n