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

Use configured repositories from sbt build #488

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Aug 5, 2024

This is a replacement of #484

I moved LibraryMigration from migrate to sbt-plugin so that we can use all configured repositories directly (Maven, and Ivy) and authentication without going through the Java interface.

mblund and others added 2 commits July 12, 2024 14:52
The scala3 migration plugin gave a false suggestion for how to migrate Akka libraries. Instead of saying that the latest 2.9.4 version was a valid scala 3 library it suggested to downgrade to a version as early as 2.6.18 up to the version 2.9.0-M2. These version are the ones that are published to the maven central that this plugin are hard coded to. Later version of akka are published to https://repo.akka.io/maven.

This patch is using the configured repository in the sbt build to resolve the dependencies and are thereby able to find the correct versions.

Now:
```
sbt:test-project>  migrateDependencies test-project
[info]
[info] Starting migration of libraries and compiler plugins in project 'test-project'
[info]
[info] Valid dependencies:
...
[info] "com.typesafe.akka" %% "akka-cluster-typed" % "2.9.4"
...
```

Before this commit, older akka versions published to maven central was suggested by the migration tool
```
[warn] Versions to update:
...
[warn] "com.typesafe.akka" %% "akka-cluster-typed" % "2.6.17" (Other versions: 2.6.18, ..., 2.9.0-M2)
...

```
@adpi2 adpi2 merged commit df60b1d into scalacenter:main Aug 6, 2024
6 checks passed
@mblund
Copy link
Contributor

mblund commented Aug 9, 2024

I tested the latest release today and it found all the latest jars via my configured repos in the sbt build. 👍

[info] sbt-scala3-migrate 0.7.0 detected!

[info] Valid dependencies:
...
[info] "com.lightbend.akka.management" %% "akka-management-cluster-bootstrap" % "1.5.1"
...
[info] "com.typesafe.akka" %% "akka-actor-testkit-typed" % "2.9.4"
[info] "com.typesafe.akka" %% "akka-cluster-typed" % "2.9.4"
[info] "com.typesafe.akka" %% "akka-cluster-sharding-typed" % "2.9.4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants