Commit d8e6ddf
committed
Refactor check of Coursier ordering onto
This change just refactors the logic of the check to live on `Version.Update`
(introduced with 13380eb in PR #3145 in August 2023), which feels like a
good place for it to belong.
The check for whether our version-updates comply with Coursier
version-ordering was added with this PR in January 2020:
* #1210
...the check was supposed to be temporary, until Scala Steward's
own `Order[Version]` was considered battle-tested, but I don't know
when we'll decide that's happened!
## `current == next` is ok?
Since commit 75c08e6, committed directly to `main` a day later,
`VersionOrderingConflict` has only been raised if `current > next` - so
`current == next` is fine. There's no further info on _why_ in the commit
tho'!
75c08e6
## New `coursier-versions` library
Our Scala Steward check uses `coursier.core.Version`, which is deprecated since
Coursier 2.1.25:
https://github.com/coursier/coursier/blame/0f3ceb65e9e46826967d2e4cb6f87cf7fb3e5c9d/modules/core/shared/src/main/scala/coursier/core/Version.scala#L14
...the recommended class is now `coursier.version.Version`, which is in the newer
https://github.com/coursier/versions library created in May 2020:
https://github.com/coursier/versions/blob/main/versions/shared/src/coursier/version/Version.scalaVersion.Update
1 parent cfc35f4 commit d8e6ddf
3 files changed
Lines changed: 16 additions & 7 deletions
File tree
- modules/core/src
- main/scala/org/scalasteward/core
- data
- update
- test/scala/org/scalasteward/core/data
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
138 | 135 | | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
| |||
0 commit comments