Skip to content

Commit ba0a39e

Browse files
committed
fix(ffi): stop the backend boundary check flagging the engine JSR tree
(cherry picked from commit c92f338dab01e793049f22a3ee5b0c46ba54e830)
1 parent cc87e6e commit ba0a39e

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

scripts/check_ffi_boundaries.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,16 @@ check_no_backend_dependency() {
115115
if [ -n "$pattern" ]; then
116116
pattern="$pattern|"
117117
fi
118-
pattern="${pattern}(ffi/objc/${backend}/|\"${backend}/)"
118+
# The bare "<backend>/ form matches a file sitting directly in that
119+
# backend's directory, which is how ffi/objc/<backend> is laid out -- they
120+
# are flat. Requiring no further path segment is what keeps this from also
121+
# matching the engine tree at NativeScript/napi/<engine>/, which collides in
122+
# include space with the ffi/objc/napi backend but is a different thing
123+
# entirely: ffi/objc/hermes including "napi/hermes/jsr.h" is that backend
124+
# reaching for its own engine's JSR, not a dependency on another backend.
125+
# The fully qualified ffi/objc/<backend>/ form below still catches any
126+
# depth, so nothing is lost.
127+
pattern="${pattern}(ffi/objc/${backend}/|\"${backend}/[^/]*\")"
119128
done
120129

121130
if [ -n "$pattern" ] && search_sources "$pattern" "$owner_dir"; then

0 commit comments

Comments
 (0)