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

Can there be an option to auto-rebaseline after failure? #14

Open
handstandsam opened this issue May 3, 2022 · 1 comment
Open

Can there be an option to auto-rebaseline after failure? #14

handstandsam opened this issue May 3, 2022 · 1 comment
Milestone

Comments

@handstandsam
Copy link
Collaborator

No description provided.

@handstandsam handstandsam added this to the 0.3.0 milestone May 12, 2022
@handstandsam handstandsam modified the milestones: 0.3.0, 0.4.0 May 26, 2022
@qwert2603
Copy link
Contributor

Hi! At first glance it looks useful to get rid of extra actions the user needs to do to re-baseline dependencies:

  • update deps and get the build error
  • ./gradlew dependencyGuardBaseline
  • commit updated baselines to git
  • build again

But, on the other hand, if "auto-rebaseline" will be in gradle's plugin configuration and everything will be done automatically, it will be implicit and less transparent. It will be easy to forget to commit updated baselines to git after auto-rebaseline. In such case it will be unclear, why build is successful on local machine, but fails on CI.

There could be a build flag to explicitly specify that baselines must be updated in case of error. Also there could be corresponding message in build log after auto-rebaseline.

./gradlew :app:assembleDebug --dependency-guard-auto-rebaseline

Another question — should all the baselines in the project be updated in such case or only baselines in the module being build?

Actually, the most explicit way is to get build error and re-baseline manually. It won't take a lot of time, especially with configuration cache enabled, because re-baselining itself takes less than 1 second even on the large-scale project. And the command to re-baseline is listed in the build error.

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

2 participants