[packages_autoroller] Migrate to dart build cli#181273
Conversation
|
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. |
There was a problem hiding this comment.
Code Review
This PR migrates the pre-build step for generate_gradle_lockfiles from dart compile exe to dart build cli. While the implementation in packages_autoroller.dart is correct, the corresponding tests in dev/packages_autoroller/test/packages_autoroller_test.dart have not been updated and will likely fail. The tests need to be adjusted to mock the new dart build cli command. I have also left a comment to improve maintainability by dynamically determining the output executable name.
|
cc @liamappelbe |
|
|
Bug: * flutter#181265 Tested locally `$ ./dev/packages_autoroller/run --token token.txt` and commenting out all the GitHub stuff: ``` [...] Executing [/Users/dacoharkes/src/flutter/package_autoroller_checkouts/framework/bin/dart, build, cli, --target, /Users/dacoharkes/src/flutter/package_autoroller_checkouts/framework/dev/tools/bin/generate_gradle_lockfiles.dart, -o, /var/folders/jc/4znngjfn6f7cxghhg0027rnh00klzg/T/zDK1S4]... The `dart build cli` command is in preview at the moment. See documentation on https://dart.dev/interop/c-interop#native-assets. Deleting output directory: /var/folders/jc/4znngjfn6f7cxghhg0027rnh00klzg/T/zDK1S4/. Generated: /var/folders/jc/4znngjfn6f7cxghhg0027rnh00klzg/T/zDK1S4/bundle/bin/generate_gradle_lockfiles Executing [/Users/dacoharkes/src/flutter/package_autoroller_checkouts/framework/bin/flutter, --verbose, update-packages, --force-upgrade]... [ +19 ms] executing: sysctl hw.optional.arm64 [...] ```
Bug:
Tested locally
$ ./dev/packages_autoroller/run --token token.txtand commenting out all the GitHub stuff: