-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
Description
Since version 9.2.0 (migration to native assets), the package fails to build (only when testing) when fetched from a custom package repository (e.g., Artifactory).
Logs
Building assets for package:objective_c failed.
build.dart returned with exit code: 255.
To reproduce run:
(cd /Users/max/agent/_work/_temp/hosted/artifactory.***%47artifactory%47api%47pub%47dart%47/objective_c-9.2.2/; /Users/max/agent/_work/_tool/Flutter/3.38.7/macos/flutter/bin/cache/dart-sdk/bin/dart --packages=/Users/max/agent/_work/1/s/.dart_tool/package_config.json /Users/max/agent/_work/1/s/.dart_tool/hooks_runner/objective_c/5f31b8d621e364a094b467a268c7b433/hook.dill --config=/Users/max/agent/_work/1/s/.dart_tool/hooks_runner/objective_c/5f31b8d621e364a094b467a268c7b433/input.json )
stderr:
Unhandled exception:
Exception: Command failed: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk -target x86_64-apple-darwin -c /Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/test/util.c -fpic -I src -o /Users/max/agent/_work/1/s/.dart_tool/hooks_runner/shared/objective_c/build/5f31b8d621/obj/test/util.c.o
#0 Builder._compile (file:///Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/hook/build.dart:144:7)
<asynchronous suspension>
#1 Builder.buildObject (file:///Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/hook/build.dart:120:5)
<asynchronous suspension>
#2 Future.wait.<anonymous closure> (dart:async/future.dart:546:21)
<asynchronous suspension>
#3 main.<anonymous closure> (file:///Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/hook/build.dart:76:25)
<asynchronous suspension>
#4 build (package:hooks/src/api/build_and_link.dart:158:5)
<asynchronous suspension>
#5 main (file:///Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/hook/build.dart:27:3)
<asynchronous suspension>
INFO: 2026-01-20 15:59:44.750594: Running: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk -target x86_64-apple-darwin -x objective-c -fobjc-arc -c /Users/max/agent/_work/_temp/hosted/artifactory.***%47artifactory%47api%47pub%47dart%47/objective_c-9.2.2/src/ns_number.m -fpic -I src -o /Users/max/agent/_work/1/s/.dart_tool/hooks_runner/shared/objective_c/build/5f31b8d621/obj/ber.m.o
INFO: 2026-01-20 15:59:44.750762: Running: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk -target x86_64-apple-darwin -x objective-c -fobjc-arc -c /Users/max/agent/_work/_temp/hosted/artifactory.***%47artifactory%47api%47pub%47dart%47/objective_c-9.2.2/src/protocol.m -fpic -I src -o /Users/max/agent/_work/1/s/.dart_tool/hooks_runner/shared/objective_c/build/5f31b8d621/obj/ol.m.o
INFO: 2026-01-20 15:59:44.750872: Running: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.1.sdk -target x86_64-apple-darwin -x objective-c -fobjc-arc -c /Users/max/agent/_work/_temp/hosted/artifactory.***%47artifactory%47api%47pub%47dart%47/objective_c-9.2.2/src/objective_c_bindings_generated.m -fpic -I src -o /Users/max/agent/_work/1/s/.dart_tool/hooks_runner/shared/objective_c/build/5f31b8d621/obj/ive_c_bindings_generated.m.o
INFO: 2026-01-20 15:59:44.836190:
INFO: 2026-01-20 15:59:44.836803: clang: error: no such file or directory: '/Users/max/agent/_work/_temp/hosted/artifactory.***%2547artifactory%2547api%2547pub%2547dart%2547/objective_c-9.2.2/test/util.c'
clang: error: no input files
Step to reproduce
- Host the objective_c package (version >= 9.2.0) on a custom pub repository.
- Add dependency to a Dart project pointing to this custom host.
- Run dart pub get.
- Run the build (or dart run).
Analysis
I think that the hook/build.dart script or the underlying CBuilder logic mishandles file paths that contain URL-encoded characters.
The folder name generated by pub has '%47' in its name (that encodes '/') and clang is looking for a folder with '%2547' but it doesn't exists. It seems that the '%' has been encode a second time (%25)
Reactions are currently unavailable