Commit Graph

99 Commits

Author SHA1 Message Date
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 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
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
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 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
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
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
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 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
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
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
bigwheel c1a93c65b7 [Fix #287] Eviction warning summary shows only binary incompatible 2019-01-10 22:24:11 +09: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 22a4eed65f Default eviction warning to summary 2018-07-01 02:10:41 -04:00
Eugene Yokota 2b4aa3973d Fix flaky OfflineModeSpec
Fixes https://github.com/sbt/librarymanagement/issues/229

OfflineModeSpec is failing often because it asserts that the offline resolution needs to happen within 30% of the original resolution, and I guess it really depends on the weather how much portion of it spends on resolution.
2018-06-14 03:16:49 -04:00
Eugene Yokota c0a0b7db0c Merge branch '1.1.x' into wip/merge-1.1.x 2018-06-14 01:42:01 -04:00
OlegYch bbb2ef3977 fix retrieving deps via sftp resolver 2018-04-11 22:23:16 +03:00
Eugene Yokota 1073513b49 Merge branch '1.1.x' into wip/merge-1.1.x 2018-03-27 06:19:28 -04:00
Dennis Hörsch 245997c84e
Added test for wildcards in org and name 2018-03-06 13:48:42 +00:00
exoego 091edf6ea1 Add a new eviction warning summary to decide whether or not to warn eviction summary. 2018-02-15 22:06:55 +09:00
Dale Wijnand 60b9c7dacb
Remove a bunch of compilation warnings 2018-02-15 09:26:13 +00:00
Eugene Yokota c0ac7061db Reorganize existing tests 2018-01-12 23:10:15 -05:00
Eugene Yokota 9c1566dfa1 Fix false positive on sbt 1.x module eviction warnings
Fixes #187
2017-11-29 20:02:37 -05:00
xuwei-k a385a13fa5 fix incorrect eviction warning message 2017-11-02 15:10:05 +09:00
Peter Vlugter 437165eeb5 Include sbt plugin extra attributes in cached resolution 2017-08-16 11:27:26 +12:00
Dale Wijnand 63e63f05fa
Add back, re-configure & re-enable Scalafmt 2017-08-10 12:04:58 +01:00