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

Using custom dependency rules for scalafix-migrations with 'type: "build"' #3276

Open
cptwunderlich opened this issue Jan 29, 2024 · 0 comments

Comments

@cptwunderlich
Copy link

cptwunderlich commented Jan 29, 2024

I tried using a scalafix-migration with type: "build", which uses a custom rule, published to a private repository.
But I realized, that these types of migrations are run with scalafix CLI, which does not resolve rules from other repositories. One would have to explicitly call it with scalafix --tool-classpath $(cs fetch myorg::rules:vesion -p) --rules=MyRule.

Is there any reasonable way to add this functionality to scala-steward?

My use-case is this: We have an internal meta-package and we are preparing an upcoming release with many changes, e.g., upgrade to Play 2.9.
However, Tapir jumped straight to Play 3 for its submodules (e.g., tapir-play-server) and I created a new submodule for Play 2.9 instead (tapir-play29-server). So I need to rewrite the Dependencies.scala file.

I also looked at the artifact migrations, but it seems like this only works if the listed artifact itself has a new version.
Post-update hooks seem a bit hacky for this scenario and there is no way to apply this to a specific version only.

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

No branches or pull requests

1 participant