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

Option to abort on scalafix migration failure #3273

Open
cptwunderlich opened this issue Jan 26, 2024 · 1 comment
Open

Option to abort on scalafix migration failure #3273

cptwunderlich opened this issue Jan 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@cptwunderlich
Copy link

I'm currently trying to get custom scalafix migrations to work with our scala-steward setup.
In the process, I'm doing a lot of tests and I noticed the following:

scala-steward finds my update, tries to apply the migrations, they fail for various reasons, scala-steward moves on.
I now have an open PR with the bumped versions, but without the migrations applied, so it won't build.
Fixing the migrations and re-running scala-steward won't help, bc. the dependency version hasn't changed.
I cannot delete a PR on Github. Even if I close it and delete the source branch, scala-steward sees a closed PR for a given upgrade.
So there is no way to "retry".

It'd be nice to have a config option to tell scala-steward not to open the PR at all, if migrations fail. Or to make specific migrations "mandatory", i.e., their failure will cause no PR to be opened.

@fthomas
Copy link
Member

fthomas commented Jan 26, 2024

It'd be nice to have a config option to tell scala-steward not to open the PR at all, if migrations fail.

Sounds good to me. We could just throw before this line if result is a Left and the corresponding config option is set. This would abort the whole update and not create a PR.

@fthomas fthomas added the enhancement New feature or request label Jan 26, 2024
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

No branches or pull requests

2 participants