File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments