[objective_c] 9.6.1 hook uses `Architecture.arm64e`, which no published `code_assets` has
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
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:
```dart
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:
```yaml
dependencies:
code_assets: ^2.0.0
```
which 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:
```yaml
dependency_overrides:
code_assets:
path: ../code_assets
hooks:
path: ../hooks
```
Those 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_c` 9.6.1 — transitive, via `path_provider_foundation` 2.6.0
- `code_assets` 2.0.0, `hooks` 2.0.0
- iOS ad-hoc archive (`flutter build ipa --export-method ad-hoc`)
### Workaround
```yaml
dependency_overrides:
objective_c: 9.6.0
```
### Suggested 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.
Contributor guide
Research direction
Start with objective_c's hook/build.dart around lines 222 and 231-233, then inspect its pubspec.yaml dependency and dependency_overrides. Run the direct dart compile reproduction with published code_assets 2.0.0, and verify that the downstream hook compiles successfully without monorepo overrides; consider the issue's proposed release or reversion paths and the requested release check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, objective-c
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100