-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Reland] Gradle Lockfile workaround #178485
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a workaround to temporarily disable Gradle dependency locking across multiple projects. It modifies the generate_gradle_lockfiles.dart script to add command-line flags for creating and deleting an .ignore-locking.md file. The script is also updated to regenerate numerous build.gradle files with logic that checks for this ignore file to conditionally disable dependency locking. My review includes a couple of suggestions for the script to improve cross-platform robustness and adhere to idiomatic Groovy conventions.
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Tree borked on the original PR because we moved to only use a single lockfile. The borked tests copy the local project to a temp dir, alter stuff, then run the tests: flutter/dev/devicelab/lib/tasks/hot_mode_tests.dart Lines 70 to 72 in 862e4a7
With the gradle files copied to a temp dir, the relative path check for the single ignore file failed - and the tests failed, because the lockfiles were not ignored. This PR moves back to creating an ignore file for every project. This ignore file will be copied to temp directories so lockfile checking should be ignored. |
Create a workaround for generating gradle lock files. When the ignore files exist, gradle locking will be disabled. This will allow deps for the embedder to be checked in, and then in a follow-up PR the lockfiles can correctly be updated and the ignore files can be deleted. Note: This does NOT include the addition of the new exifinterface dep for the Android embedder. Fixes: flutter#177066 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
Create a workaround for generating gradle lock files. When the ignore files exist, gradle locking will be disabled. This will allow deps for the embedder to be checked in, and then in a follow-up PR the lockfiles can correctly be updated and the ignore files can be deleted. Note: This does NOT include the addition of the new exifinterface dep for the Android embedder. Fixes: flutter#177066 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
Create a workaround for generating gradle lock files. When the ignore files exist, gradle locking will be disabled. This will allow deps for the embedder to be checked in, and then in a follow-up PR the lockfiles can correctly be updated and the ignore files can be deleted. Note: This does NOT include the addition of the new exifinterface dep for the Android embedder. Fixes: flutter#177066 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
Create a workaround for generating gradle lock files. When the ignore files exist, gradle locking will be disabled. This will allow deps for the embedder to be checked in, and then in a follow-up PR the lockfiles can correctly be updated and the ignore files can be deleted.
Note: This does NOT include the addition of the new exifinterface dep for the Android embedder.
Fixes: #177066
Pre-launch Checklist
///).