Skip to content

flutter build macos succeeds even if native asset builds failed #137910

@mkustermann

Description

@mkustermann

A simple flutter create hello app that depends on a package with native assets seems to build just fine with flutter build macos even though the actual native build of the depedency failed.

Repro: Create flutter create hello make it depend on foo, make foo simply throw an exception in build.dart. flutter build macos will then

% flutter build macos --verbose

[        ] [   +1 ms] Running `... .../build.dart   .../.dart_tool/native_assets_builder/a6d771ecb50a7ea677377d476b2a411d/config.yaml`.                                                                                                                                          [+1409 ms] [+1409 ms] Unhandled exception:                                                                                                                                                                                                                   [        ] [        ] foo                                                                                                                                                                                                                                      [        ] [        ] #0      main (...) 
[        ] [        ] #1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
[        ] [        ] #2      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)                                                                                                                                                  [  +25 ms] [  +25 ms] Building native assets for package:libexif failed.                                                                                                                                                                                     [        ]            build.dart returned with exit code: 255.                                                                                                                                                                                               [        ]            To reproduce run:                                                                                                                                                                                                                      [        ]            /Users/kustermann/repositories/flutter/bin/dart --packages=/Users/kustermann/na/hello/.dart_tool/package_config.json /Users/kustermann/na/libexif/build.dart             
...
[        ]     /
[  +39 ms] ** BUILD SUCCEEDED **
[  +32 ms] Building macOS application... (completed in 27.2s)
[   +2 ms] "flutter macos" took 29,083ms.
[ +154 ms] ensureAnalyticsSent: 152ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
% echo $?
0

Metadata

Metadata

Assignees

Labels

dependency: dartDart team may need to help usteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions