Repository navigation
Description
objective_c 9.6.1 (published 2026-09-15) fails to compile its build hook for
every downstream consumer, breaking all iOS/macOS builds of any app that
transitively depends on it (e.g. via path_provider_foundation).
Error
../../../.pub-cache/hosted/pub.dev/objective_c-9.6.1/hook/build.dart:222:16: Error: Member not found: 'arm64e'.
Architecture.arm64e: 'arm64e-apple-darwin',
^^^^^^
../../../.pub-cache/hosted/pub.dev/objective_c-9.6.1/hook/build.dart:231:16: Error: Member not found: 'arm64e'.
Architecture.arm64e: {
^^^^^^
Bad state: Generating kernel failed!
Building native assets for package:objective_c failed.
Compilation of hook returned with exit code: 254.
Target build_hooks failed: Error: Building native assets failed.
Cause
hook/build.dart in 9.6.1 uses Architecture.arm64e at lines 222 and 231-233:
final appleClangMacosTargetFlags = {
Architecture.arm64: 'arm64-apple-darwin',
Architecture.arm64e: 'arm64e-apple-darwin', // line 222
Architecture.x64: 'x86_64-apple-darwin',
};
final appleClangIosTargetFlags = {
Architecture.arm64: {...},
Architecture.arm64e: { // line 231
IOSSdk.iPhoneOS: 'arm64e-apple-ios',
IOSSdk.iPhoneSimulator: 'arm64e-apple-ios-simulator',
},
...
};But Architecture.arm64e does not exist in any published version of
code_assets. The latest release is 2.0.0 (2026-08-18), whose Architecture
only defines arm, arm64, ia32, riscv32, riscv64 and x64 — adding
arm64e is still tracked by the open issue #3379.
Meanwhile objective_c 9.6.1 declares:
dependencies:
code_assets: ^2.0.0which resolves to 2.0.0 for consumers, so the hook cannot compile.
This is masked inside the monorepo because objective_c's own pubspec carries:
dependency_overrides:
code_assets:
path: ../code_assets
hooks:
path: ../hooksThose paths resolve to the unpublished in-repo versions that do have
arm64e. dependency_overrides are ignored for downstream consumers, so the
published constraint ^2.0.0 was never actually exercised before release.
For comparison, 9.6.0 is fine: it only mentions arm64e as a clang -arch
string literal, never as an Architecture member.
Reproduction
Any Flutter app with a transitive dependency on objective_c:
flutter build ipa
Or directly, without Flutter:
dart compile kernel --packages=.dart_tool/package_config.json \
--output=/tmp/hook.dill \
~/.pub-cache/hosted/pub.dev/objective_c-9.6.1/hook/build.dart
Environment
- Flutter 3.47.2 (stable), Dart 3.13.2, macOS
objective_c9.6.1 — transitive, viapath_provider_foundation2.6.0code_assets2.0.0,hooks2.0.0- iOS ad-hoc archive (
flutter build ipa --export-method ad-hoc)
Workaround
dependency_overrides:
objective_c: 9.6.0Suggested fix
Either release code_assets with Architecture.arm64e (#3379) and bump
objective_c's constraint to require that version, or revert the arm64e
usage in the hook. Since 9.6.1 currently breaks the build of every consumer,
retracting it in the meantime would help.
It might also be worth adding a release check that resolves the package without
its dependency_overrides, so a constraint that only works inside the monorepo
cannot be published again.
Activity
liamappelbe commentedon Sep 15, 2026
Oops. I'll retract v9.6.1
cc @dcharkes
liamappelbe commentedon Sep 15, 2026
Keeping this bug open to remind me to republish once the new code_assets is published
liamappelbe commentedon Sep 15, 2026
cc @brianquinlan
dcharkes commentedon Sep 15, 2026
@liamappelbe Can we add a check to CI that catches us making mistakes like these?
resolution: workspace, does apub get, and thendart analyze? This would validate the dependency bounds are high enough. (It wouldn't catch semantic breaking changes, but it would catch static breaking changes.)Any other ideas?
liamappelbe commentedon Sep 16, 2026
This sounds like the best approach to me.