Repository navigation
Description
Summary
The Dart SDK rolls this repo into its DEPS file. #3728 ("Track header
files as build dependencies") makes the Dart SDK test
pkg/dartdev/test/native_assets/install_test.dart fail. Because of that,
the latest SDK dependency roll holds dart-lang/native at 10515af, the
commit just before #3728. The other dependencies in that roll were updated
as usual.
Until this is resolved and native_rev in the SDK DEPS moves past
#3728, the SDK will not pick up new commits from this repo.
What fails
The SDK bots fail two tests in install_test.dart:
dart install dart_app (with build hooks and code assets)dart install --overwrite
Both fail while building native_add:
clang --target=arm64-apple-darwin ... -fPIC -O3 ... -DRELEASE -DNDEBUG \
.../native_add/src/native_add.c .../native_add/src/native_add.h \
-framework Foundation --shared -o .../libnative_add.dylib ...
clang: error: cannot specify -o when generating multiple output files
Failing build (mac-arm64):
https://ci.chromium.org/b/8668117913278491681
Cause
#3728 makes two changes that only work together:
pkgs/hooks_runner/test_data/native_add/hook/build.dartnow passes
sources: ['src/$packageName.c', 'src/$packageName.h'].CBuilderinnative_toolchain_cnow removes.hfiles from
sourcesbefore calling the compiler. This change is only in
0.19.6-wip. The published version is still0.19.5.
The SDK's dart install tests copy the test_data projects from this repo.
dart install resolves dependencies in a temporary helper package, so the
dependency_overrides in the copied projects (which point at the local
checkout) are ignored. native_add depends on native_toolchain_c: any,
so dart install resolves to the published 0.19.5. That version still
passes the .h file to clang, and clang fails as shown above.
In short, the test_data changes are released together with the SDK
checkout, but the package they depend on resolves to the published
version. When a test project needs an unreleased native_toolchain_c
feature, dart install breaks.
Possible resolutions
We would like the maintainers of this repo to choose the approach. Some
options:
- Revert the
.hentry intest_data/native_add(and any other test
projects thatdart installuses) untilnative_toolchain_c0.19.6 is
published. - Publish
native_toolchain_c0.19.6, so theanyconstraint resolves to
a version that filters headers. - Keep
test_dataprojects that the SDK tests use compatible with the
latest published versions of this repo's packages.
The SDK tests could also be changed to point native_toolchain_c at the
local checkout, the way install_test.dart already does for hooks and
record_use. Any of these changes needs a follow-up SDK roll that moves
native_rev past #3728. The SDK side will handle that roll once a fix
lands here.
Reproduce
In a Dart SDK checkout with native_rev at 237524d or later (after
gclient sync):
python3 tools/test.py -n unittest-asserts-release-<os>-<arch> \
pkg/dartdev/test/native_assets/install_test
Related SDK roll CL: https://dart-review.googlesource.com/c/sdk/+/563220
Activity
dcharkes commentedon Oct 13, 2026
I believe this is the best course of action.
[deps] rev dartdoc, ecosystem, http, native, test, tools
[deps] Roll dart-lang/native