-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Ignore macOS Cocoapods linting failure on DT_TOOLCHAIN_DIR error #133588
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
Ignore macOS Cocoapods linting failure on DT_TOOLCHAIN_DIR error #133588
Conversation
|
Related #131527. |
| // introduced with Xcode 15. Fix was made in Cocoapods, but is not in an | ||
| // official release yet. | ||
| // TODO(vashworth): Stop ignoring when https://github.com/flutter/flutter/issues/133584 is complete. | ||
| if (!lintStdout.toString().contains('error: DT_TOOLCHAIN_DIR cannot be used to evaluate')) { |
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.
Isn't this going to ignore all failures with Xcode 15, because every failure will contain this as one of the lines, regardless of any other failures?
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.
Pretty much. Basically pod lib lint won't work for macOS until the Cocoapods fix is in an official release and we update our CI to use it.
We could alternatively check for the Xcode version first and skip linting if it's Xcode 15+.
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.
Just made a slight improvement so if there's more errors than just the DT_TOOLCHAIN_DIR error, it'll still throw it
stuartmorgan-g
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.
Thanks, the more targeted version seems like a much safer workaround.
| Map<String, String>? environment, | ||
| bool canFail = false, // as in, whether failures are ok. False means that they are fatal. | ||
| String? workingDirectory, | ||
| StringBuffer? stdout, |
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.
Why do we need this change instead of using the return value?
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.
Because it throws an error on the _execute command and therefore never hits line 450 where it returns
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.
Ah, I see. Let's put the same comment here as from the line below, for consistency. (Unfortunate that this error output gets logged to stdout rather than stderr.)
| Map<String, String>? environment, | ||
| bool canFail = false, // as in, whether failures are ok. False means that they are fatal. | ||
| String? workingDirectory, | ||
| StringBuffer? stdout, |
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.
Ah, I see. Let's put the same comment here as from the line below, for consistency. (Unfortunate that this error output gets logged to stdout rather than stderr.)
| )); | ||
| } | ||
|
|
||
| Future<void> _tryMacOSLint(String executable, List<String> arguments) async { |
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.
We should move the executable and the first few arguments into this method, and make arguments into podspecPath + extraArguments. Right now, despite the name it can actually run any command, but then it's looking for pod lint-specific output.
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.
Good idea. Done!
stuartmorgan-g
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!
flutter/flutter@1fe2495...c175cf8 2023-08-31 [email protected] Ignore macOS Cocoapods linting failure on DT_TOOLCHAIN_DIR error (flutter/flutter#133588) 2023-08-31 [email protected] `InputDecorationTheme.isCollapsed` doesn't work if `InputDecoration.isCollapsed` is not provided. (flutter/flutter#133189) 2023-08-31 [email protected] Roll Flutter Engine from 5156c03344eb to 772d5e996af8 (1 revision) (flutter/flutter#133752) 2023-08-31 [email protected] Roll Flutter Engine from 1917fa95ea55 to 5156c03344eb (2 revisions) (flutter/flutter#133745) 2023-08-31 [email protected] Roll Flutter Engine from 1f1071d3f5ba to 1917fa95ea55 (2 revisions) (flutter/flutter#133739) 2023-08-31 [email protected] Roll Flutter Engine from e88b21b6d4e8 to 1f1071d3f5ba (1 revision) (flutter/flutter#133737) 2023-08-31 [email protected] Roll Flutter Engine from 0559a733c888 to e88b21b6d4e8 (1 revision) (flutter/flutter#133735) 2023-08-31 [email protected] Roll Flutter Engine from 3b75e3de7ef3 to 0559a733c888 (1 revision) (flutter/flutter#133734) 2023-08-31 [email protected] [framework] use ImageFilter for stretch overscroll. (flutter/flutter#133613) 2023-08-31 [email protected] Roll Flutter Engine from 73e86369614d to 3b75e3de7ef3 (2 revisions) (flutter/flutter#133724) 2023-08-31 [email protected] Roll Flutter Engine from 8f1b77b1ac69 to 73e86369614d (1 revision) (flutter/flutter#133720) 2023-08-31 [email protected] Roll Flutter Engine from d37cef84d40d to 8f1b77b1ac69 (1 revision) (flutter/flutter#133714) 2023-08-31 [email protected] Mark leak in _DraggableScrollableSheetState. (flutter/flutter#133693) 2023-08-30 [email protected] Mark routing test as leaking. (flutter/flutter#133697) 2023-08-30 [email protected] Roll Flutter Engine from b63eee2e31cc to d37cef84d40d (3 revisions) (flutter/flutter#133706) 2023-08-30 [email protected] _RawAutocompleteState should dispose _highlightedOptionIndex. (flutter/flutter#133700) 2023-08-30 [email protected] Forward-fix a test that will break with an engine roll. (flutter/flutter#133619) 2023-08-30 [email protected] Fix `cancelButtonStyle` & `confirmButtonStyle` properties from `TimePickerTheme` aren't working (flutter/flutter#132843) 2023-08-30 [email protected] Updated DropdownMenu example and added a test (flutter/flutter#133592) 2023-08-30 [email protected] Add `cancelButtonStyle` & `confirmButtonStyle` to the `DatePickerThemeData` (flutter/flutter#132847) 2023-08-30 [email protected] Roll Flutter Engine from 31d5662dcb53 to b63eee2e31cc (1 revision) (flutter/flutter#133692) 2023-08-30 [email protected] Fixing memory leak in EditableTextState (flutter/flutter#131377) 2023-08-30 [email protected] Roll Flutter Engine from 69f04bdfe952 to 31d5662dcb53 (14 revisions) (flutter/flutter#133683) 2023-08-30 [email protected] Expose barrierDismissible in PageRoute constructor (flutter/flutter#133659) 2023-08-30 [email protected] Update the infrastructure issue template (flutter/flutter#133519) 2023-08-30 [email protected] Reland "Remove ImageProvider.load, DecoderCallback and `PaintingBinding.instantiateImageCodec` (#132679) (reverted in #133482) (flutter/flutter#133605) 2023-08-30 [email protected] Roll Packages from d7d3150 to 64af59e (4 revisions) (flutter/flutter#133675) 2023-08-30 [email protected] Update & improve `TabBar.labelColor` tests (flutter/flutter#133668) 2023-08-30 [email protected] Bump gradle heap size limits in templates (flutter/flutter#133671) 2023-08-30 [email protected] Marks Windows module_test to be flaky (flutter/flutter#133640) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Xcode 15 introduced an error into Cocoapods when building macOS apps.
When
pod lib lintruns, it under the covers is building the app withxcodebuild, which is why this error occurs when linting.A fix has been made in Cocoapods, but is not in an official release so we can't upgrade Cocoapods yet. This is to temporarily ignore lint failure due to that error.
Fixes #132980.
Tracking issue to upgrade Cocoapods when fix is in a release: #133584
Since Xcode 15 isn't in CI, I tested it in a one-off led test:
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.