Skip to content

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

@cptwunderlich

Description

@cptwunderlich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions