Commit Graph

153 Commits

Author SHA1 Message Date
Kunal cf5fc207b0
Update CrossVersionUtil.scala (#426) 2023-08-30 09:06:44 -04:00
Matthew de Detrich 10a79d6001
Add Apache staging repo 2023-07-27 10:16:15 +02:00
eugene yokota cbd7195aee
Merge pull request #418 from xuwei-k/java-net-URL
avoid deprecated `java.net.URL` constructor
2023-06-25 14:08:22 -04:00
xuwei-k 9a1d836b4e update scalafmt 2023-06-25 10:16:26 +09:00
xuwei-k 363c0fe015 avoid deprecated `java.net.URL` constructor
- https://bugs.openjdk.org/browse/JDK-8295949
- openjdk/jdk@4338f52
2023-06-25 09:46:39 +09:00
Adriaan Moors 998df8b692 Allow user to suppress eviction errors for a specific library
... even if they would result in an incompatible eviction
based on the assumed version scheme.
2023-05-04 21:04:29 +02:00
Adriaan Moors 87f8089ba8 More readability for processEvictions 2023-05-04 21:04:29 +02:00
Adriaan Moors 2821443c80 Simplify processEvictions by inlining calculateCompatible 2023-05-04 21:04:29 +02:00
Eugene Yokota 7d052bde8f Deprecate IntegrationTest
We plan to remove IntegrationTest configuration.
See https://eed3si9n.com/sbt-drop-custom-config/ for details.
2023-04-24 01:14:49 -04:00
Nicolas Rinaudo e8cce49ba6 Expand properties found in maven settings 2023-04-09 15:46:23 +02:00
eugene yokota c57c466c10
Merge pull request #411 from mdedetrich/add-apache-maven-snapshot-repository
Add Apache Maven Snapshots Repository
2023-02-20 10:51:09 -05:00
Matthew de Detrich 63d3dccb9e
Add Apache Maven Snapshots Repository 2023-02-18 10:44:25 +01:00
Arman Bilge 3cee90bd55 Add `POM_RELEASE_NOTES_KEY` 2023-02-13 04:05:10 +00:00
Arman Bilge f17280780d Formatting 2022-07-30 02:51:02 +00:00
Arman Bilge d2fba6fde0
Better deprecation message for `sonatypeRepo` 2022-07-29 19:32:14 -07:00
Eugene Yokota 457af6978f Fix isScalaBinaryCompatibleWith
Problem
-------
Current impl is relaxed about comparing non-release Scala 2.x versions.

Solutution
----------
Use scalaApiVersion to compare two Scala 2 versions.
2022-06-26 21:05:52 -04:00
Rui Gonçalves daec6265c4
Rename function and extend support to Scala 4+ 2022-06-25 22:54:08 +01:00
Rui Gonçalves 2318269dc5
Add CrossVersionExtra.isBinaryCompatible utility 2022-06-25 21:41:10 +01:00
Eugene Yokota 76452e53ff Drop OkHttp dependency
Ref https://github.com/sbt/sbt/issues/6912

Problem
-------
There's apparently a security issue with OkHttp 3.x,
which I am not really sure how applicable it is to our usage
of OkHttp but it is there.

Solution
--------
Since most of OkHttp-specic usage within LM is for Apache Ivy
downloading, I am going to drop this.
Since `sbt.librarymanagement.Http.http` is a public API,
I am substituting this with Apache HTTP backed implementation.
2022-06-12 22:24:44 -04:00
eugene yokota e15f0c149a
Merge pull request #393 from armanbilge/feature/sonatypeRepos
Deprecate `sonatypeRepo`, add `sonatypeOssRepos` to `Resolver`
2022-05-07 19:04:44 -04:00
Eugene Yokota a071882321 Add predefined list of licenses 2022-01-31 19:22:37 -05:00
Arman Bilge 7a2f81ea05 sonatypeRepos -> sonatypeOssRepos 2022-01-31 23:23:34 +00:00
Arman Bilge c17309a914 Deprecate sonatypeRepo, add sonatypeRepos 2022-01-16 21:43:36 +00:00
Arman Bilge a561f3a901 Add shortcut for s01.oss.sonatype.org to Resolver
Fixes https://github.com/sbt/sbt/issues/6787.
See also: https://central.sonatype.org/news/20210223_new-users-on-s01/
2022-01-16 21:34:54 +00:00
Peter Janssen f89ba48906 Respect maven.repo.local property 2021-12-23 16:38:52 +01:00
Eugene Yokota 129b43acd2 intern/flyweight ConfigRef
Fixes https://github.com/sbt/sbt/issues/6721

Problem
-------
ConfigRef is among the most created on heap.

Solution
--------
intern/flyweight it.
2021-11-20 19:39:18 -05:00
xuwei-k 3ca1898721 fix warning. prepare Scala 3 2021-11-17 12:19:45 +09:00
Roberto Tyley 9786906eca Avoid repeating versions in Eviction error message
Rather than seeing an error like this, with the evicted version numbers
being repeated many times:

```
[error] 	* org.scala-lang.modules:scala-java8-compat_2.13:1.0.0 (early-semver) is selected over {0.9.0, 0.9.0, 0.9.0, 0.9.0, 0.9.1, 0.9.1, 0.9.1}
```

...I'd much rather see an error like this:

```
[error]         * org.scala-lang.modules:scala-java8-compat_2.13:1.0.0 (early-semver) is selected over {0.9.0, 0.9.1}
```
2021-09-17 18:12:13 +01:00
Adrien Piquerez 37234e35ba Fix Scala 3 binary version
- for 3.0.1-bin-nonbootstrapped it should be 3
- for 3.0.1-SNAPSHOT it should be 3
2021-07-08 13:14:16 +02:00
Eugene Yokota 0aa7d69ee6 Fix cross-Scala suffix conflict warning
Fixes https://github.com/sbt/sbt/issues/6578

Problem
-------
The regex currently expects two segments like2.x or 3.x,
but Scala 3 uses _3 as the cross suffix, and it's not caught.

Solution
--------
Change the regex.
2021-07-05 04:11:20 -04:00
Matthias Kurz 0cc4397bf9
Use correct Sonatype releases repository 2021-05-18 10:09:44 +02:00
Eugene Yokota ae9f17c8fc Permit dot in cross util version parsing
Ref #377
2021-05-15 14:55:23 -04:00
Eugene Yokota 0ce5142b17 Apply version number parsing fix
Ref #377

Apply the dotted-prerelease tag to SemComparator
"A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version."
2021-05-15 14:12:46 -04:00
Amina Adewusi 6f87212b9f Fixes sbt/sbt#6496 - bug in version parser
What is the problem?
sbt/sbt#6496 identifies a bug in the logic which assesses whether
different versions of the same transitive dependency are binary
compatible. If one of the transitive dependencies included a version
with a full-stop literal, it would be parsed incorrectly and an error
would be thrown to the user falsely saying that the dependencies are
binary incompatible.

What is the solution?
This PR fixes the regex used by the parser to include full-stop literals.

Is there anything else to be done?
It is worth us checking the rest of the codebase in case this bug might
exist in other parsers. The tests are super helpful for figuring out
which strings might break the current logic.
2021-05-14 19:39:37 +01:00
Adrien Piquerez c98e51418f Fix binary version of 3.0.1-RC1 2021-03-30 17:50:50 +02:00
Eugene Yokota dc0b682d7e Implement assumedVersionScheme
Ref https://github.com/sbt/sbt/issues/6302
Ref https://github.com/sbt/sbt/issues/6301

Apparently some users are interested in keeping the eviction warning
feature, so here's an option to bring guessing back.
2021-02-21 04:49:36 -05:00
eugene yokota 70e7718353
Merge pull request #365 from eed3si9n/wip/rename
Follow up on scala3doc rename
2021-02-14 13:37:47 -05:00
Eugene Yokota 3a9b0303f8 Follow up on scala3doc rename
Ref https://github.com/sbt/sbt/issues/6307
Ref https://github.com/lampepfl/dotty/pull/11289
2021-02-14 13:21:53 -05:00
Eugene Yokota 12d46e3fce Make ModuleID#cross(...) preserve existing prefix
Fixes https://github.com/sbt/sbt/issues/6280

sbt-platform-deps implements `%%%` operator in https://github.com/portable-scala/sbt-platform-deps/blob/v1.0.0/src/main/scala/org/portablescala/sbtplatformdeps/PlatformDepsBuilders.scala#L36-L43
by setting the prefix field on `sbt.librarymanagement.Binary(...)`.
Currently `.cross(...)` would wipe this out, so `%%%` and `cross(CrossVersion.for3Use2_13)` do not compose.

This changes the implementation of `.cross(...)` so it can be chained
together and it will try to preserve the prefix (and suffix) values from
the existing `crossVersion` values.
This should fix the 2.13-3.x sandwich on Scala.JS and Scala Native.
2021-01-23 15:47:33 -05:00
Eugene Yokota 7b45fc594f Contraband files 2021-01-17 06:00:12 -05:00
Eugene Yokota 417a30f8db Update to Scala 2.12.13 + 2.13.4 2021-01-17 04:18:49 -05:00
Adrien Piquerez 2b1806ae25 Add for3Use2_13 and for2_13Use3 2021-01-08 18:25:01 +01:00
eugene yokota 42aae724f8
Merge pull request #359 from adpi2/scala3doc
Add scala3doc artifact
2021-01-03 01:07:06 -05:00
Eugene Yokota 5942ccbe1f Add Scala 2.13 support 2021-01-03 00:59:38 -05:00
Adrien Piquerez ec34dd71a3 Add scala3-tasty-inspector artifact 2020-12-30 15:01:08 +01:00
Adrien Piquerez 51d64c7eef Add scala3doc artifact 2020-12-29 16:42:20 +01:00
João Ferreira 997ce66a1a regen contraband 2020-12-21 17:43:24 +00:00
Eugene Yokota 9297139f6a Implement EvictionError
Ref https://eed3si9n.com/enforcing-semver-with-sbt-strict-update

This adds EvictionError, a replacement for EvictionWarning.
The problem with the current eviction warning is that it has too many
false positives. Using the versionScheme information that could be
supplied by the library authors and/or the build users, this eliminates
the guessing work. At which point, we can fail the resolution.
2020-12-20 19:35:15 -05:00
Eugene Yokota aac1edb426 Add Strict and Always support 2020-12-20 19:34:03 -05:00
Eugene Yokota dc0d873f7b Use evalPvp
Follow-up on https://github.com/sbt/librarymanagement/pull/352
2020-12-20 16:58:50 -05:00