-
Notifications
You must be signed in to change notification settings - Fork 6k
Update pre-commit formatter to use java from repo rather than path. #54450
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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. 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. |
|
Ah, I thought format didn't have tests, I now see that it does, will test, sec. |
|
OK, I believe this should be ready for review. |
reidbaker
left a comment
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.
Lots of these changes are formatting. If there is something else changed in format.dart other than lines 498 - 524 can you call them out.
|
I’ll just make it again without the formatting changes. Sec.
…On Thu, Aug 8, 2024 at 11:45 AM Reid Baker ***@***.***> wrote:
***@***.**** approved this pull request.
Lots of these changes are formatting. If there is something else changed
in format.dart other than lines 498 - 524 can you call them out.
—
Reply to this email directly, view it on GitHub
<#54450 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADU2TJDNLKPKEGRQUJUJZDZQO4EDAVCNFSM6AAAAABMG7WAVGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMRYGYZDAMBQHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This removes the recently added requirement of contributors having java on their path. Also removed the mention of java being needed in setup (I don't have java installed and have built the engine from mac for years). Fixes flutter/flutter#152968 Fixes flutter/flutter#129221
|
Fixed to remove formatting changes. PTAL. Thanks! |
|
Looks like linux is failing. I cant tell why maybe we do assume that java needs to be on the path for CI? |
|
I can look more shortly. I suspect the path may not exist for linux and it may need to use |
|
I had lost the "log the path" bits in my "remove formatting changes" update. Running the bots again should give us better data. |
|
Turns out the paths inside openjdk differ per platform (based on searching for other uses of such in the repo). 🤦 |
|
OK, so this is the problem on linux: ERROR: Cannot find Java (/b/s/w/ir/cache/builder/src/flutter/third_party/java/openjdk/bin/java). Did you run I might have gotten the location wrong, can look more later. |
|
Hmm, looks like it's not always downloaded: |
| final bool plural = failed.length > 1; | ||
| if (fixing) { | ||
| error('Fixing ${failed.length} Java file${plural ? 's' : ''}' | ||
| message('Fixing ${failed.length} Java file${plural ? 's' : ''}' |
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.
This is just changing to match what the C++ formatter does in this case.
|
Looks like this is ready (as far as the bots are concerned), but I'm in no rush to land. Looks like you CC'd matan, so I'll happily wait for additional reviews (or feel free to click squash and merge once reviewed). |
I added matan because I thought you would need 2 contributors to approve but you are a contributor. Feel free to land and consider matan fyi. |
|
I'll wait for the bots to green again (after I removed the prints) and then press squash. Thanks! |
matanlurey
left a comment
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.
LGTM
…153182) flutter/engine@c9ec468...4d5b1df 2024-08-09 [email protected] Roll Skia from 31c432c02665 to 13b4fee1ba99 (1 revision) (flutter/engine#54470) 2024-08-09 [email protected] Update pre-commit formatter to use java from repo rather than path. (flutter/engine#54450) 2024-08-09 [email protected] Remove swiftshader from the license script excludes list (flutter/engine#54412) 2024-08-09 [email protected] Roll Dart SDK from 1cc09f3f3642 to 35bc5c866149 (1 revision) (flutter/engine#54468) 2024-08-09 [email protected] Roll Skia from 0bedf6746d9e to 31c432c02665 (1 revision) (flutter/engine#54467) 2024-08-09 [email protected] Roll Dart SDK from 9222e4c96f4d to 1cc09f3f3642 (2 revisions) (flutter/engine#54465) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
| } | ||
| ], | ||
| 'condition': 'download_android_deps', | ||
| # Always download the JDK since java is required for running the formatter. |
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.
DBC: This should continue to be controlled by a variable. It can default to true for local dev, but then CI builds that don't need it can still set it to false.
|
What does DBC mean? Would you like action from me? Thanks!
…On Sat, Aug 10, 2024 at 7:19 AM Zachary Anderson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In DEPS
<#54450 (comment)>:
> @@ -799,7 +799,7 @@ deps = {
'version': 'version:17'
}
],
- 'condition': 'download_android_deps',
+ # Always download the JDK since java is required for running the formatter.
DBC: This should continue to be controlled by a variable. It can default
to true for local dev, but then CI builds that don't need it can still set
it to false.
—
Reply to this email directly, view it on GitHub
<#54450 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADU2TPKZX45C35OCX3WQALZQYOP3AVCNFSM6AAAAABMG7WAVGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDEMZRGQ2TQNJZGY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Oh, sorry. It means drive-by comment. As a follow-up, if you wouldn't mind doing the following, it would be helpful:
This will save on repo checkout time on the CI bots. Thanks! |
|
This is still in my inbox (I've not forgotten), but it may be a while before I code again. |
…lutter#153182) flutter/engine@c9ec468...4d5b1df 2024-08-09 [email protected] Roll Skia from 31c432c02665 to 13b4fee1ba99 (1 revision) (flutter/engine#54470) 2024-08-09 [email protected] Update pre-commit formatter to use java from repo rather than path. (flutter/engine#54450) 2024-08-09 [email protected] Remove swiftshader from the license script excludes list (flutter/engine#54412) 2024-08-09 [email protected] Roll Dart SDK from 1cc09f3f3642 to 35bc5c866149 (1 revision) (flutter/engine#54468) 2024-08-09 [email protected] Roll Skia from 0bedf6746d9e to 31c432c02665 (1 revision) (flutter/engine#54467) 2024-08-09 [email protected] Roll Dart SDK from 9222e4c96f4d to 1cc09f3f3642 (2 revisions) (flutter/engine#54465) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Follow up from #54450 (comment)
…lutter#153182) flutter/engine@c9ec468...4d5b1df 2024-08-09 [email protected] Roll Skia from 31c432c02665 to 13b4fee1ba99 (1 revision) (flutter/engine#54470) 2024-08-09 [email protected] Update pre-commit formatter to use java from repo rather than path. (flutter/engine#54450) 2024-08-09 [email protected] Remove swiftshader from the license script excludes list (flutter/engine#54412) 2024-08-09 [email protected] Roll Dart SDK from 1cc09f3f3642 to 35bc5c866149 (1 revision) (flutter/engine#54468) 2024-08-09 [email protected] Roll Skia from 0bedf6746d9e to 31c432c02665 (1 revision) (flutter/engine#54467) 2024-08-09 [email protected] Roll Dart SDK from 9222e4c96f4d to 1cc09f3f3642 (2 revisions) (flutter/engine#54465) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
This seems to break engine build on Linux/Arm64 |
This removes the recently added requirement of contributors having
javaon their path.Also removed the mention of java being needed in setup (I don't have java
installed and have built the engine from mac for years).
Fixes flutter/flutter#152968
Fixes flutter/flutter#129221