-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[native_assets] Fix macOS host build failure when there are no frameworks to sign. #150742
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
[native_assets] Fix macOS host build failure when there are no frameworks to sign. #150742
Conversation
a0d226c to
c4233e7
Compare
c4233e7 to
a6d755f
Compare
dcharkes
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!
Thanks @bdero! 🙏
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…o frameworks to sign. (flutter/flutter#150742)
…orks to sign. (flutter#150742) When the `"${native_assets_path}"*.framework` glob doesn't resolve anything, the bash will run the loop once with the original unglobbed value: `/path/to/native/assets/*.framework`. Skip this case to prevent the build from failing when there are no frameworks to sign. To reproduce this build failure: 1. Enable native assets in the Flutter tool: `flutter config --enable-native-assets` 2. Create a Flutter project with the default template: `flutter create test_native_assets` 3. Add a build hook that does nothing (`hook/build.dart`). 4. Try to build/run the app: `flutter run --debug -d macos`
…orks to sign. (flutter#150742) When the `"${native_assets_path}"*.framework` glob doesn't resolve anything, the bash will run the loop once with the original unglobbed value: `/path/to/native/assets/*.framework`. Skip this case to prevent the build from failing when there are no frameworks to sign. To reproduce this build failure: 1. Enable native assets in the Flutter tool: `flutter config --enable-native-assets` 2. Create a Flutter project with the default template: `flutter create test_native_assets` 3. Add a build hook that does nothing (`hook/build.dart`). 4. Try to build/run the app: `flutter run --debug -d macos`
|
Heads up, @bdero I think you wanted the I added it, PR is here: #153967 |
|
Whoopsies, thanks. |
…e no frameworks to sign. (#153967) ### Issue Link: #153842 (also duplicate #153268) ### Changelog Description: Fixes macOS host build failure when there are no native asset frameworks to codesign ### Impact Description: macOS apps may fail to build with the error: `*.framework: No such file or directory`. ### Workaround: 1. Use the the master or beta (3.25.0-0.1.pre) channels. 2. Some users report `flutter clean` temporarily unwedged them. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? ### Validation Steps: From PR #150742 To reproduce this build failure: 1. Enable native assets in the Flutter tool: `flutter config --enable-native-assets` 2. Create a Flutter project with the default template: `flutter create test_native_assets` 3. Add a build hook that does nothing (`hook/build.dart`). 4. Try to build/run the app: `flutter run --debug -d macos` Expect the build to succeed.
…orks to sign. (flutter#150742) When the `"${native_assets_path}"*.framework` glob doesn't resolve anything, the bash will run the loop once with the original unglobbed value: `/path/to/native/assets/*.framework`. Skip this case to prevent the build from failing when there are no frameworks to sign. To reproduce this build failure: 1. Enable native assets in the Flutter tool: `flutter config --enable-native-assets` 2. Create a Flutter project with the default template: `flutter create test_native_assets` 3. Add a build hook that does nothing (`hook/build.dart`). 4. Try to build/run the app: `flutter run --debug -d macos`
When the
"${native_assets_path}"*.frameworkglob doesn't resolve anything, bash will run the loop once with the original unglobbed value:/path/to/native/assets/*.framework. Skip this case to prevent the build from failing when there are no frameworks to sign.To reproduce this build failure:
flutter config --enable-native-assetsflutter create test_native_assetshook/build.dart).flutter run --debug -d macos