Skip to content

Commit dbe62c8

Browse files
committed
ci: accept the versioned weak-node-api install name on macOS
The first CI run of this check reported 8 dependencies across 10 binary slices. The two misses were the macOS slices: macOS frameworks use the versioned bundle layout, so weak-node-api's install name there is @rpath/weak-node-api.framework/Versions/0.1.1/weak-node-api where iOS, tvOS and visionOS get the flat @rpath/weak-node-api.framework/weak-node-api Both are a genuine dependency on the framework, so match the optional "Versions/<version>/" component rather than only the flat form. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SrPdjhQ6aG949mVDDaiT2U
1 parent edf07cf commit dbe62c8

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/check.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,19 @@ jobs:
449449
# Verify every binary depends on the weak-node-api framework.
450450
# otool -L prints one header line per file, or one per architecture
451451
# when the file is fat, so the number of headers is exactly the number
452-
# of "@rpath/weak-node-api.framework/weak-node-api" lines we expect.
453-
# Deriving it beats hard-coding a count, which silently rots whenever
454-
# a triplet is added or dropped.
452+
# of weak-node-api dependencies we expect. Deriving it beats
453+
# hard-coding a count, which silently rots whenever a triplet is added
454+
# or dropped.
455+
# macOS frameworks use the versioned bundle layout, so their install
456+
# name is .../weak-node-api.framework/Versions/<version>/weak-node-api
457+
# where the embedded platforms get the flat
458+
# .../weak-node-api.framework/weak-node-api — hence the optional
459+
# "Versions/<version>/" in the pattern.
455460
SLICE_COUNT=$(grep -c "^ferric_example\.apple\.node/.*:$" otool-output.txt || true)
456-
WEAK_NODE_API_COUNT=$(grep -c "@rpath/weak-node-api\.framework/weak-node-api" otool-output.txt || true)
461+
WEAK_NODE_API_COUNT=$(grep -cE "@rpath/weak-node-api\.framework/(Versions/[^/]+/)?weak-node-api" otool-output.txt || true)
457462
echo "Found $WEAK_NODE_API_COUNT weak-node-api dependencies across $SLICE_COUNT binaries"
458463
if [ "$SLICE_COUNT" -eq 0 ] || [ "$WEAK_NODE_API_COUNT" -ne "$SLICE_COUNT" ]; then
459-
echo "Expected $SLICE_COUNT occurrences of @rpath/weak-node-api.framework/weak-node-api (one per binary), found $WEAK_NODE_API_COUNT"
464+
echo "Expected $SLICE_COUNT dependencies on the weak-node-api framework (one per binary), found $WEAK_NODE_API_COUNT"
460465
cat otool-output.txt
461466
exit 1
462467
fi

0 commit comments

Comments
 (0)