[tool] Use `swift-format` from Xcode
As of Xcode 16, swift-format is part of the Xcode distribution. Since CI now uses Xcode 16, we can just always use that version.
This:
- Removes the
swift-format-pathlogic. - Removes the check for
swift-formatbeing available - Defaults Swift formatting to true only on macOS
- Removes the
swift-formatCIPD package from .ci.yaml - Updates Pigeon in packages using Swift Pigeon generation to pick up a fix for a lint issue picked up by the latest version of
swift-format(which was already fixed in Pigeon).
Fixes https://github.com/flutter/flutter/issues/153803
Pre-Review Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter.
- [x] I signed the CLA.
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I linked to at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under[^1]. - [x] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under[^1]. - [x] I updated/added any relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or I have commented below to indicate which test exemption this PR falls under[^1].
- [x] All existing and new tests are passing.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
@jmagman / @vashworth Any objection to this approach of just unconditionally using xcrun, rather than using the multi-step check originally described in https://github.com/flutter/flutter/issues/153803 ?
We could still do that version, if we wanted to support overriding the swift-format version (or to allow running swift-format from other platforms), but in practice I think that now that it's part of Xcode the chances that anyone will ever actually want to run a version that's not the Xcode version is very low, so probably not worth the complexity in the tool.
@jmagman / @vashworth Any objection to this approach of just unconditionally using
xcrun, rather than using the multi-step check originally described in flutter/flutter#153803 ?We could still do that version, if we wanted to support overriding the
swift-formatversion (or to allow runningswift-formatfrom other platforms), but in practice I think that now that it's part of Xcode the chances that anyone will ever actually want to run a version that's not the Xcode version is very low, so probably not worth the complexity in the tool.
No objection. We should document how to add this back somewhere in case we do want to use it again.
We should document how to add this back somewhere in case we do want to use it again.
I'll add a comment with some context and a link to this PR on the constructor line that makes it default to on for macOS only.
CHANGELOG/version override: webview_flutter_wkwebview change is whitespace-only.
autosubmit label was removed for flutter/packages/9460, because - The status or check suite Linux_android android_device_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.
autosubmit label was removed for flutter/packages/9460, because - The status or check suite Linux_android android_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.
autosubmit label was removed for flutter/packages/9460, because - The status or check suite Linux_android android_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.