Commit Graph

387 Commits

Author SHA1 Message Date
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
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
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
Eugene Yokota d0ce65378c Refactor system properties lookup 2019-08-27 17:18:05 -04:00
Eugene Yokota cc6147c8d2 Remove lmCommonTest 2019-08-17 23:55:58 -04:00
Eugene Yokota 8c16fd0edf switch to using scala-verify 2019-08-14 12:32:49 -04:00
Eugene Yokota c89695b4b2 Deprecate HTTP resolvers
Ref https://github.com/sbt/sbt/issues/4905
2019-08-01 16:20:22 -04:00
Steve Waldman 315fbec370 Add more neurotic resource management, close()ing of streams. 2019-06-29 12:41:26 -07:00
Steve Waldman 20ca549612 Fix detection of truncation (so messages exactly max length aren't flagged truncated) 2019-06-29 00:08:44 -07:00
Steve Waldman 25f36e65a7 Capture and report any error message in the response body when uploads fail. 2019-06-28 23:30:10 -07:00
Arnout Engelen 4e46acde12
Add toString for DirectCredentials
To make 'show credentials' more useful
2019-05-09 14:06:03 +02:00
Eugene Yokota 6a36ce7689 applying Scalafmt 2.0.0-RC6 with sbt/sbt rules 2019-04-29 23:32:52 -04:00
Eugene Yokota a28b546457 isolate Ivy homes during tests 2019-04-29 00:51:57 -04:00
Eugene Yokota 2e971b9a85 Add OkHttpClient parameter
Ref #297

This adds a parameter so we can pass in OkHttpClient, if someone wants to customize HTTP behavior.
2019-04-03 00:15:28 -04:00
0lejk4 a4e5a2e299 leave scheme unchanged for binary compatibility but don`t render email tag if it is null or empty 2019-03-17 11:32:52 +02:00
0lejk4 0878b9db14 make Developer email optional as it is not obligatory and some people don`t want to expose it 2019-03-14 00:10:26 +02:00
bigwheel c1a93c65b7 [Fix #287] Eviction warning summary shows only binary incompatible 2019-01-10 22:24:11 +09:00
Eugene Yokota 29183f2fad Use fixed thread pool
Fixes #274

In #249 parallel download switched to using its own thread pool.
It could potentially lead to unbounded download if nobody throttled.
This works around the issue by fixing the number of thread to 6, which is a common per-host max connection count.
2018-11-01 02:27:19 -04:00
Dale Wijnand 0eadc6a6cb Drop trailing commas.. 2018-10-18 14:11:04 -04:00
Dale Wijnand 58bfe85f42 Collapse eviction warnings
Rather than

    [warn] There may be incompatibilities among your library dependencies.
    [warn] Run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies.
    [warn] Run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies.
    [warn] Run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies.
    [warn] Run 'evicted' to see detailed eviction warnings

I would get:

    [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings
    [info] Done updating.
    [warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings

which is a touch better. (IMO!)
2018-10-18 14:10:59 -04:00
Eugene Yokota f1a99e5e4a Fix the contains issue
Fixes https://github.com/sbt/librarymanagement/issues/259
2018-10-15 03:02:53 -04:00