Skip to content

Conversation

@bdero
Copy link
Member

@bdero bdero commented Jun 25, 2024

When the "${native_assets_path}"*.framework glob 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:

  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

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 25, 2024
@bdero bdero force-pushed the bdero/fix-native-assets-empty branch 2 times, most recently from a0d226c to c4233e7 Compare June 25, 2024 02:32
@bdero bdero force-pushed the bdero/fix-native-assets-empty branch from c4233e7 to a6d755f Compare July 23, 2024 01:04
@bdero bdero marked this pull request as ready for review July 23, 2024 01:08
@bdero bdero requested a review from dcharkes July 23, 2024 01:08
Copy link
Contributor

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks @bdero! 🙏

@dcharkes dcharkes added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 23, 2024
@auto-submit auto-submit bot merged commit ed470fd into flutter:master Jul 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 24, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 26, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 28, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 28, 2024
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…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`
@bdero bdero added the cp: merge-to-stable Cherry-picks that should be merged to stable label Aug 22, 2024
@jmagman jmagman added cp: stable cherry pick this pull request to stable release candidate branch and removed cp: merge-to-stable Cherry-picks that should be merged to stable labels Aug 22, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Aug 22, 2024
…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`
@jmagman
Copy link
Member

jmagman commented Aug 22, 2024

Heads up, @bdero I think you wanted the cp: stable label https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request

I added it, PR is here: #153967

@bdero
Copy link
Member Author

bdero commented Aug 22, 2024

Whoopsies, thanks.

auto-submit bot pushed a commit that referenced this pull request Aug 26, 2024
…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.
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: stable cherry pick this pull request to stable release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants