Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load artifact migrations from this repository #2249

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Sep 23, 2021

This splits ArtifactMigrations into a loader and finder class. The
former loads the latest artifact migrations from this repository instead
of using the static list of migrations that is shipped as resource in
the JAR. That means that all Scala Steward instances use the artifact
migrations from this repository as soon as they are added here.

The following changes with this PR:

  • The --artifact-migrations option can now be used multiple times to
    load extra migrations not only from one but multiple files.
  • Arguments to the --artifact-migrations cannot only be local files
    but also remote URLs.
  • Scala Steward prints how many artifact migrations it loaded at
    start-up.

The same has been done for Scalafix migrations in #1650.

Closes: #1963

This splits `ArtifactMigrations` into a loader and finder class. The
former loads the latest artifact migrations from this repository instead
of using the static list of migrations that is shipped as resource in
the JAR. That means that all Scala Steward instances use the artifact
migrations from this repository as soon as they are added here.

The following changes with this PR:
* The `--artifact-migrations` option can now be used multiple times to
  load extra migrations not only from one but multiple files.
* Arguments to the `--artifact-migrations` cannot only be local files
  but also remote URLs.
* Scala Steward prints how many artifact migrations it loaded at
  start-up.

The same has been done for Scalafix migrations in #1650.

Closes: #1963
@fthomas fthomas added the enhancement New feature or request label Sep 23, 2021
@fthomas fthomas added this to the 0.11.0 milestone Sep 23, 2021
@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #2249 (f17d24a) into master (a890c3d) will increase coverage by 0.06%.
The diff coverage is 96.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2249      +/-   ##
==========================================
+ Coverage   78.22%   78.29%   +0.06%     
==========================================
  Files         132      135       +3     
  Lines        2273     2271       -2     
  Branches       55       55              
==========================================
  Hits         1778     1778              
+ Misses        495      493       -2     
Impacted Files Coverage Δ
.../scala/org/scalasteward/core/application/Cli.scala 96.15% <ø> (ø)
...ala/org/scalasteward/core/application/Config.scala 97.36% <ø> (ø)
...ore/update/artifact/ArtifactMigrationsFinder.scala 92.30% <92.30%> (ø)
...la/org/scalasteward/core/application/Context.scala 85.00% <100.00%> (+0.25%) ⬆️
...scala/org/scalasteward/core/update/UpdateAlg.scala 100.00% <100.00%> (ø)
...asteward/core/update/artifact/ArtifactChange.scala 100.00% <100.00%> (ø)
...steward/core/update/artifact/ArtifactChanges.scala 100.00% <100.00%> (ø)
...ore/update/artifact/ArtifactMigrationsLoader.scala 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a890c3d...f17d24a. Read the comment docs.

Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fthomas fthomas merged commit 8a251e7 into master Sep 23, 2021
@fthomas fthomas deleted the topic/load-latest-artifact-migrations branch September 23, 2021 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle artifact migrations similar to Scalafix migrations
2 participants