Commit Graph

405 Commits

Author SHA1 Message Date
Eugene Yokota a01a2f8bac Revert "remove a few more java.net.URL"
This reverts commit 861b8aa792.
2024-10-04 04:08:09 -04:00
João Ferreira 861b8aa792 remove a few more java.net.URL 2024-06-17 22:18:05 +01:00
João Ferreira d078dc4772 Artifact 2024-06-17 22:18:05 +01:00
Eugene Yokota 02fc0d9d89 Merge branch 'wip/sbt-2.x-merge' into wip/sbt-2.x 2024-05-31 00:21:45 -07:00
Adrien Piquerez 1b3d5324bb Use String instead of File as key of stamps
- regenerate contraband
2024-05-29 10:37:56 +02:00
Adrien Piquerez b3edb6a405 Fix merge 2024-05-23 17:04:26 +02:00
Adrien Piquerez 863004961c Merge remote-tracking branch 'origin/develop' into wip/sbt-2.x 2024-05-23 16:53:23 +02:00
Eugene Yokota 4f108dfc80 Merge branch 'develop' into wip/sbt-2.x-merge 2024-05-13 00:13:46 -04:00
Eugene Yokota 13f7bb250b sjsonnew 0.14.0-M1 2023-10-29 14:54:24 -04:00
Matthew de Detrich fd3b33b472
Add allModuleReports to UpdateReport 2023-09-11 00:55:09 +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
Eugene Yokota d4296d3e91 Reproduce sbt/sbt#6745 2023-05-06 22:52:59 -04:00
Eugene Yokota 6fee91bbff Don't apply platform substitution to % 2023-03-12 19:06:18 -04:00
Eugene Yokota 47ef80eadf Subsume platform cross building
Problem
In sbt 1, platform cross building is implemented using in the user-land
using `%%%` operator, which clevery handles both Scala cross building
and appending platform suffix like sjs1.
However, in general symbolic `%%%` is confusing, and hard to explain.

Solution
In sbt 2, we should subsume the idea of platform cross building,
so `%%` can act as the current `%%%` operator.
This adds a new field called `platformOpt` to `ModuleID`, which
by default will be set to `None`.
`ScalaModuleInfo` will also add a new field called `platform`,
which can be set to `None`, `Some(sjs1)` etc.
As part of module transformation (like adding `_2.13`), the library
management engine can transform `ModuleID` to `sjs1` etc.
`("com.github.scopt" %% "scopt" % "4.1.0").platform(jvm)` will
explicitly use the JVM version of dependency (equivalent to today's `%%`).
2023-03-12 03:25:29 -04:00
Eugene Yokota f0c54a9fe9 Make some tests working 2023-03-12 03:25:29 -04:00
Eugene Yokota 5581b0c31c Cast module 2023-03-12 03:25:29 -04:00
Eugene Yokota 3fa547d1b4 Cast module 2023-01-19 04:59:14 -05:00
Adrien Piquerez 5a0e9b2fe7 Try resolve sbt plugin from valid Maven pattern
sbt plugins were published to an invalid path with regard to Maven's
specifictation.

As of sbt 1.9 we produce two POMs, a deprecated one and a new one,
that is valid with regard to Maven resolution. When resolving,
we first try to resolve the new valid POM and we fallback to
the invalid one if needed.

In the new POM format, we append the sbt cross-version to all
artifactIds of sbt plugins. This is because we want Maven to be
able to resolve the plugin and all its dependencies.

When parsing it, we remove the cross-version suffix so that
the result of parsing the valid POM format is exactly the same
as parsing the deprecated POM format. Hence conflict resolution
happens as intended.

More details can be found at https://github.com/sbt/sbt/pull/7096
2022-12-23 16:08:05 +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 a8f2b1f636 Reformat 2022-01-30 03:08:24 -05:00
Eugene Yokota a4ce8db55b Manually edit Contraband-generated code 2022-01-30 02:55:26 -05:00
Eugene Yokota e9ee8a6cab Scala 3 2022-01-30 02:55:17 -05:00
xuwei-k 3ca1898721 fix warning. prepare Scala 3 2021-11-17 12:19:45 +09:00
Ubaldo Pescatore f0aa5d312e
typo fixed. 2021-08-12 17:21:07 +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
Peter Janssen 976ff44037 Fix logic and added test 2021-06-01 11:24:02 +02:00
Peter Janssen 3de165c1dd Expand allowed maven repository id characters to match maven
see 5c45b3fe22/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java (L84)
2021-05-28 17:15:48 +02:00
Eugene Yokota fe33ed19de Fix binary Scala warning, take 2
Ref https://github.com/sbt/librarymanagement/pull/372
2021-03-22 02:30:00 -04:00
Adrien Piquerez fd9e1cd929 No binary scala warning if 3 and 2.13 2021-03-18 15:15:11 +01:00
Guillaume Massé 956e8483f5 Dont quote realm if it's null in Credentials.toString 2021-03-08 23:25:38 -05:00
Guillaume Massé 3132647ac1 Fix sbt/sbt#6362 2021-03-06 22:42:32 -05: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
Adrien Piquerez 2b1806ae25 Add for3Use2_13 and for2_13Use3 2021-01-08 18:25:01 +01:00
Eugene Yokota 5942ccbe1f Add Scala 2.13 support 2021-01-03 00:59:38 -05: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 5f2f6ac161 Fix Ivy parsing of versionScheme 2020-12-20 19:33:00 -05:00
eugene yokota 7547f67294
Merge pull request #352 from eed3si9n/wip/match_error
Fixes match error when using withDottyCompat
2020-12-19 17:32:40 -05:00
Eugene Yokota 2308d0a3a7 Fixes match error when using withDottyCompat
Fixes https://github.com/sbt/sbt/issues/6210

scodec-bits is published with pvp versionScheme (nice), this means that
we should just evaluate the version portion for pvp-ness, but I was
using `guessSecondSegment` that checks for Scala suffix. That's mistake
1.

`guessSecondSegment` assumes that the Scala suffix uses the given
ScalaModuleInfo, but with 2.13-3 sandwich we can't assume this.
In the reported case, Scala module is 3.0.0-M3 but scodec-bits uses
2.13. So that's mistake 2.

This attempts to correct both the mistakes.
1. Instead of `guessSecondSegment`, this adds a simpler `evalPvp`
function.
2. `guessSecondSegment` just looks for `_2.` or `_3` and ignores the
Scala module.
2020-12-19 17:08:24 -05:00
Adrien Piquerez 24f85fd18c Adapt ScalaOverride to Scala 3 2020-12-18 17:28:47 +01:00
Eugene Yokota f63adb4a8a Util 1.4.0 2020-10-04 12:42:46 -04:00
izharahmd 07e3815261 retry publish on all 5XX errors 2020-09-29 19:20:42 +05:30
izharahmd fa0f859552 retry with backoff while publishing 2020-09-15 20:32:38 +05:30
Maksim Ochenashko c8626e5402
Update ConvertResolver.scala
Add information on how to enable overwriting using `pushRemoteCache`.
2020-06-17 13:27:26 +03:00
Eugene Yokota fd71e8cb17 Bump Contraband 2020-04-06 18:15:46 -04:00
Eugene Yokota cdba2dbc53 Remove "merged artifact" error message
Fixes https://github.com/sbt/sbt/issues/4520

It seems to display "Detected merged artifact" whenever the download fails, which is confusing.
2020-01-07 01:35:36 -05:00
eugene yokota 42ad5c5eb6
Merge branch 'develop' into richer-put-failure-info 2019-10-15 09:42:19 -04:00
Vincent PERICART d4f2b23781 Fix typo: cachedResolution 2019-09-12 10:34:44 +09:00