clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
639 stars 113 forks source link

bug: Header resolution works in auto-completion but doesn't work for compilation #689

Open tjzel opened 1 month ago

tjzel commented 1 month ago

I have the following file NativeWorkletsModuleSpec.h:

NativeWorkletsModuleSpec.h ```cpp #pragma once #include // This compiles but Clangd doesn't like it. #include // This compiles and Clangd likes it. // #include #include using namespace facebook; using namespace react; namespace reanimated { class JSI_EXPORT NativeWorkletsModuleSpec : public TurboModule { protected: explicit NativeWorkletsModuleSpec( const std::shared_ptr jsInvoker); public: // SharedValue virtual jsi::Value makeShareableClone( jsi::Runtime &rt, const jsi::Value &value, const jsi::Value &shouldRetainRemote, const jsi::Value &nativeStateSource) = 0; // Scheduling virtual void scheduleOnUI(jsi::Runtime &rt, const jsi::Value &worklet) = 0; virtual jsi::Value executeOnUIRuntimeSync( jsi::Runtime &rt, const jsi::Value &worklet) = 0; // Worklet runtime virtual jsi::Value createWorkletRuntime( jsi::Runtime &rt, const jsi::Value &name, const jsi::Value &initializer) = 0; virtual jsi::Value scheduleOnRuntime( jsi::Runtime &rt, const jsi::Value &workletRuntimeValue, const jsi::Value &shareableWorkletValue) = 0; }; } // namespace reanimated ```

When compiling with XCode and generating compile_commands.json with it, the auto-suggestion work for #include <ReactCommon/, where it suggests <ReactCommon/TurboModule.h>. However, it seems that for compilation purposes it doesn't work, as the JSI_EXPORT symbol isn't defined (it's defined in TurboModule.h).

Here's how the relevant part of the header tree:

Tree ```tree . ├── React-callinvoker │   └── ReactCommon │   ├── CallInvoker.h -> ../../../../../../../../node_modules/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h │   └── SchedulerPriority.h -> ../../../../../../../../node_modules/react-native/ReactCommon/callinvoker/ReactCommon/SchedulerPriority.h ├── ReactCommon │   ├── ReactCommon │   │   ├── CallbackWrapper.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/CallbackWrapper.h │   │   ├── CxxTurboModuleUtils.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/CxxTurboModuleUtils.h │   │   ├── LongLivedObject.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/LongLivedObject.h │   │   ├── TurboCxxModule.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h │   │   ├── TurboModule.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h │   │   ├── TurboModuleBinding.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.h │   │   ├── TurboModulePerfLogger.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModulePerfLogger.h │   │   └── TurboModuleUtils.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h │   ├── ReactCommon-umbrella.h -> ../../../Target Support Files/ReactCommon/ReactCommon-umbrella.h │   ├── ReactCommon.modulemap -> ../../../Target Support Files/ReactCommon/ReactCommon.modulemap │   └── react │   └── bridging │   ├── AString.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/AString.h │   ├── Array.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Array.h │   ├── Base.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Base.h │   ├── Bool.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Bool.h │   ├── Bridging.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Bridging.h │   ├── CallbackWrapper.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/CallbackWrapper.h │   ├── Class.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Class.h │   ├── Convert.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Convert.h │   ├── Dynamic.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Dynamic.h │   ├── Error.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Error.h │   ├── EventEmitter.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/EventEmitter.h │   ├── Function.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Function.h │   ├── LongLivedObject.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/LongLivedObject.h │   ├── Number.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Number.h │   ├── Object.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Object.h │   ├── Promise.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Promise.h │   └── Value.h -> ../../../../../../../../../node_modules/react-native/ReactCommon/react/bridging/Value.h ```

Everything seems to be linked correctly, here's the log for compilation command for ReactNativeModuleSpec.cpp, which is in the same directory as its header file:

Clangd compile command log ```text I[15:37:55.884] <-- textDocument/documentSymbol(95) I[15:37:55.907] ASTWorker building file /Users/bigpoppe/swmansion/reanimated/primary/packages/react-native-reanimated/Common/cpp/worklets/NativeModules/NativeWorkletsModuleSpec.h version 87 with command inferred from /Users/bigpoppe/swmansion/reanimated/primary/packages/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp [/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fno-color-diagnostics -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -Wno-comma -Wno-shorten-64-to-32 -Wno-comma -Wno-shorten-64-to-32 --target=arm64-apple-ios13.4-simulator -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/DerivedData/ModuleCache.noindex -fmodule-name=RNReanimated -D _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -fpascal-strings -O0 -fno-common -D POD_CONFIGURATION_DEBUG=1 -D DEBUG=1 -D COCOAPODS=1 -D HERMES_ENABLE_DEBUGGER=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -g -iquote /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-generated-files.hmap -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-own-target-headers.hmap -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-all-non-framework-target-headers.hmap -ivfsoverlay /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-8699adb1dd336b26511df848a716bd42-VFS-iphonesimulator/all-product-headers.yaml -iquote /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-project-headers.hmap -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/RNReanimated/include -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/RNReanimated -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/DoubleConversion -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/FBLazyVector -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTRequired -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTTypeSafety -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-Core -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-Fabric -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-FabricComponents -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-FabricImage -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-ImageManager -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-NativeModulesApple -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-RCTFabric -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-RCTText -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-callinvoker -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-cxxreact -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-debug -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-featureflags -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-graphics -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-hermes -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsi -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsiexecutor -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsinspector -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-logger -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-nativeconfig -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-perflogger -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-performancetimeline -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-rendererconsistency -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-rendererdebug -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-runtimeexecutor -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-runtimescheduler -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-utils -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCodegen -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/fmt -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/glog -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/hermes-engine -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost-for-react-native -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/glog -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-hermes -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/hermes-engine -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native-reanimated/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native-reanimated -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost-for-react-native -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/DoubleConversion -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/React-Core -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources-normal/arm64 -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources/arm64 -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/RNReanimated -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/React-hermes -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTDeprecation/RCTDeprecation.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTFabric/React-RCTFabric.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCodegen/ReactCodegen.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_Fabric/React-Fabric.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_FabricComponents/React-FabricComponents.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/glog/glog.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/jsi/React-jsi.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/jsinspector_modern/React-jsinspector.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_debug/React-debug.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_featureflags/React-featureflags.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_graphics/React-graphics.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_imagemanager/React-ImageManager.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_utils/React-utils.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/yoga/Yoga.modulemap -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D REACT_NATIVE_MINOR_VERSION=75 -D IS_REANIMATED_EXAMPLE_APP -D REANIMATED_VERSION=3.15.0 -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D FOLLY_CFG_NO_COROUTINES=1 -D FOLLY_HAVE_CLOCK_GETTIME=1 -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32 -D REACT_NATIVE_MINOR_VERSION=75 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D FOLLY_CFG_NO_COROUTINES=1 -D FOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32 -include "/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Target Support Files/RNReanimated/RNReanimated-prefix.pch" --serialize-diagnostics /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/Objects-normal/arm64/NativeReanimatedModule.dia -c -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -mlinker-version=1115.7.3 --target=arm64-apple-ios13.4.0-simulator -resource-dir=/opt/homebrew/Cellar/llvm/18.1.8/lib/clang/18 -x c++-header -std=c++20 -- /Users/bigpoppe/swmansion/reanimated/primary/packages/react-native-reanimated/Common/cpp/worklets/NativeModules/NativeWorkletsModuleSpec.h V[15:37:55.908] Driver produced command: cc1 -cc1 -triple arm64-apple-ios13.4.0-simulator -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -fsyntax-only -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name NativeWorkletsModuleSpec.h -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -ffp-contract=on -fno-rounding-math -funwind-tables=1 -target-sdk-version=18.0 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -fbuiltin-headers-in-system-modules -fdefine-target-os-macros -target-cpu apple-m1 -target-feature +zcm -target-feature +zcz -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +complxnum -target-feature +fp-armv8 -target-feature +fullfp16 -target-feature +fp16fml -target-feature +jsconv -target-feature +lse -target-feature +pauth -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-abi darwinpcs -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -fdebug-compilation-dir=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods -target-linker-version 1115.7.3 -fcoverage-compilation-dir=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods -resource-dir /opt/homebrew/Cellar/llvm/18.1.8/lib/clang/18 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk -iquote /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-generated-files.hmap -ivfsoverlay /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Pods-8699adb1dd336b26511df848a716bd42-VFS-iphonesimulator/all-product-headers.yaml -iquote /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-project-headers.hmap -include "/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Target Support Files/RNReanimated/RNReanimated-prefix.pch" -D _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -D POD_CONFIGURATION_DEBUG=1 -D DEBUG=1 -D COCOAPODS=1 -D HERMES_ENABLE_DEBUGGER=1 -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-own-target-headers.hmap -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/RNReanimated-all-non-framework-target-headers.hmap -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/RNReanimated/include -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/RNReanimated -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/DoubleConversion -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/FBLazyVector -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTRequired -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTTypeSafety -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-Core -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-Fabric -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-FabricComponents -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-FabricImage -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-ImageManager -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-NativeModulesApple -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-RCTFabric -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-RCTText -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-callinvoker -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-cxxreact -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-debug -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-featureflags -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-graphics -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-hermes -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsi -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsiexecutor -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-jsinspector -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-logger -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-nativeconfig -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-perflogger -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-performancetimeline -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-rendererconsistency -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-rendererdebug -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-runtimeexecutor -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-runtimescheduler -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-utils -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCodegen -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/fmt -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/glog -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/hermes-engine -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost-for-react-native -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/glog -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React-hermes -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/hermes-engine -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native-reanimated/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/ReactCommon -I /Users/bigpoppe/swmansion/reanimated/primary/node_modules/react-native-reanimated -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/RCT-Folly -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost-for-react-native -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/DoubleConversion -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/React-Core -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/boost -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Private/Yoga -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources-normal/arm64 -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources/arm64 -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/DerivedSources -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/RNReanimated -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -F/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Products/Debug-iphonesimulator/React-hermes -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D REACT_NATIVE_MINOR_VERSION=75 -D IS_REANIMATED_EXAMPLE_APP -D REANIMATED_VERSION=3.15.0 -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D FOLLY_CFG_NO_COROUTINES=1 -D FOLLY_HAVE_CLOCK_GETTIME=1 -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D REACT_NATIVE_MINOR_VERSION=75 -D FOLLY_NO_CONFIG -D FOLLY_MOBILE=1 -D FOLLY_USE_LIBCPP=1 -D FOLLY_CFG_NO_COROUTINES=1 -D FOLLY_HAVE_CLOCK_GETTIME=1 -stdlib=libc++ -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/local/include -internal-isystem /opt/homebrew/Cellar/llvm/18.1.8/lib/clang/18/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk/usr/include -O0 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -Wno-comma -Wno-shorten-64-to-32 -Wno-comma -Wno-shorten-64-to-32 -Wno-comma -Wno-shorten-64-to-32 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -Wno-comma -Wno-shorten-64-to-32 -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -std=c++20 -fdeprecated-macro -ferror-limit 19 -fmacro-backtrace-limit=0 -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmodules -fimplicit-module-maps -fmodules-cache-path=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/DerivedData/ModuleCache.noindex -fmodule-name=RNReanimated -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/DoubleConversion/DoubleConversion.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTDeprecation/RCTDeprecation.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTFabric/React-RCTFabric.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCodegen/ReactCodegen.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_Fabric/React-Fabric.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_FabricComponents/React-FabricComponents.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/glog/glog.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/jsi/React-jsi.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/jsinspector_modern/React-jsinspector.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_debug/React-debug.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_featureflags/React-featureflags.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_graphics/React-graphics.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_renderer_imagemanager/React-ImageManager.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/react_utils/React-utils.modulemap -fmodule-map-file=/Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/yoga/Yoga.modulemap -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-timestamp=1727098227 -fmodules-validate-once-per-build-session -fmodules-validate-system-headers -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fpascal-strings -fmax-type-align=16 -fdiagnostics-show-note-include-stack -serialize-diagnostic-file /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/Objects-normal/arm64/NativeReanimatedModule.dia -no-round-trip-args -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++-header /Users/bigpoppe/swmansion/reanimated/primary/packages/react-native-reanimated/Common/cpp/worklets/NativeModules/NativeWorkletsModuleSpec.h ```

As you can see, -I /Users/bigpoppe/swmansion/reanimated/primary/apps/paper-example/ios/Pods/Headers/Public/ReactCommon is present there.

This is the log for the autocompletion:

Autocompletion log ```text I[15:56:44.415] <-- textDocument/completion(457) I[15:56:44.438] Code complete: sema context IncludedFile, query scopes [] (AnyScope=true), expected type I[15:56:44.440] Code complete: 19 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 19 returned. I[15:56:44.440] --> reply:textDocument/completion(457) 25 ms V[15:56:44.440] >>> {"id":457,"jsonrpc":"2.0","result":{"isIncomplete":false,"items":[{"filterText":"CallInvoker.h>","insertText":"CallInvoker.h>","insertTextFormat":1,"kind":17,"label":" CallInvoker.h>","labelDetails":{},"score":1.0437226295471191,"sortText":"407a674cCallInvoker.h>","textEdit":{"newText":"CallInvoker.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"ReactCommon-umbrella.h>","insertText":"ReactCommon-umbrella.h>","insertTextFormat":1,"kind":17,"label":" ReactCommon-umbrella.h>","labelDetails":{},"score":1.0437226295471191,"sortText":"407a674cReactCommon-umbrella.h>","textEdit":{"newText":"ReactCommon-umbrella.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"ReactCommon/","insertText":"ReactCommon/","insertTextFormat":1,"kind":19,"label":" ReactCommon/","labelDetails":{},"score":1.0437226295471191,"sortText":"407a674cReactCommon/","textEdit":{"newText":"ReactCommon/","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"CallbackWrapper.h>","insertText":"CallbackWrapper.h>","insertTextFormat":1,"kind":17,"label":" CallbackWrapper.h>","labelDetails":{},"score":0.84548121690750122,"sortText":"40a78e8bCallbackWrapper.h>","textEdit":{"newText":"CallbackWrapper.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"react/","insertText":"react/","insertTextFormat":1,"kind":19,"label":" react/","labelDetails":{},"score":0.84548121690750122,"sortText":"40a78e8breact/","textEdit":{"newText":"react/","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"CxxTurboModuleUtils.h>","insertText":"CxxTurboModuleUtils.h>","insertTextFormat":1,"kind":17,"label":" CxxTurboModuleUtils.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681CxxTurboModuleUtils.h>","textEdit":{"newText":"CxxTurboModuleUtils.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"LongLivedObject.h>","insertText":"LongLivedObject.h>","insertTextFormat":1,"kind":17,"label":" LongLivedObject.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681LongLivedObject.h>","textEdit":{"newText":"LongLivedObject.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RCTInteropTurboModule.h>","insertText":"RCTInteropTurboModule.h>","insertTextFormat":1,"kind":17,"label":" RCTInteropTurboModule.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RCTInteropTurboModule.h>","textEdit":{"newText":"RCTInteropTurboModule.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RCTRuntimeExecutor.h>","insertText":"RCTRuntimeExecutor.h>","insertTextFormat":1,"kind":17,"label":" RCTRuntimeExecutor.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RCTRuntimeExecutor.h>","textEdit":{"newText":"RCTRuntimeExecutor.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RCTTurboModule.h>","insertText":"RCTTurboModule.h>","insertTextFormat":1,"kind":17,"label":" RCTTurboModule.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RCTTurboModule.h>","textEdit":{"newText":"RCTTurboModule.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RCTTurboModuleManager.h>","insertText":"RCTTurboModuleManager.h>","insertTextFormat":1,"kind":17,"label":" RCTTurboModuleManager.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RCTTurboModuleManager.h>","textEdit":{"newText":"RCTTurboModuleManager.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RCTTurboModuleWithJSIBindings.h>","insertText":"RCTTurboModuleWithJSIBindings.h>","insertTextFormat":1,"kind":17,"label":" RCTTurboModuleWithJSIBindings.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RCTTurboModuleWithJSIBindings.h>","textEdit":{"newText":"RCTTurboModuleWithJSIBindings.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"RuntimeExecutor.h>","insertText":"RuntimeExecutor.h>","insertTextFormat":1,"kind":17,"label":" RuntimeExecutor.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681RuntimeExecutor.h>","textEdit":{"newText":"RuntimeExecutor.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"SchedulerPriority.h>","insertText":"SchedulerPriority.h>","insertTextFormat":1,"kind":17,"label":" SchedulerPriority.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681SchedulerPriority.h>","textEdit":{"newText":"SchedulerPriority.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"TurboCxxModule.h>","insertText":"TurboCxxModule.h>","insertTextFormat":1,"kind":17,"label":" TurboCxxModule.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681TurboCxxModule.h>","textEdit":{"newText":"TurboCxxModule.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"TurboModule.h>","insertText":"TurboModule.h>","insertTextFormat":1,"kind":17,"label":" TurboModule.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681TurboModule.h>","textEdit":{"newText":"TurboModule.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"TurboModuleBinding.h>","insertText":"TurboModuleBinding.h>","insertTextFormat":1,"kind":17,"label":" TurboModuleBinding.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681TurboModuleBinding.h>","textEdit":{"newText":"TurboModuleBinding.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"TurboModulePerfLogger.h>","insertText":"TurboModulePerfLogger.h>","insertTextFormat":1,"kind":17,"label":" TurboModulePerfLogger.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681TurboModulePerfLogger.h>","textEdit":{"newText":"TurboModulePerfLogger.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}},{"filterText":"TurboModuleUtils.h>","insertText":"TurboModuleUtils.h>","insertTextFormat":1,"kind":17,"label":" TurboModuleUtils.h>","labelDetails":{},"score":0.78725427389144897,"sortText":"40b67681TurboModuleUtils.h>","textEdit":{"newText":"TurboModuleUtils.h>","range":{"end":{"character":22,"line":4},"start":{"character":22,"line":4}}}}]}} ```

As you can see, it suggests TurboModule.h.

Here's the whole log for auto-suggestion and what happens afterwards (when clangd tries to compile): ReactCommon.log

On the other hand, here's the log when I use <ReactCommon/ReactCommon/TurboModule.h> instead: ReactCommonReactCommon.log


Please let me know if you want more logs/unverbose logs.

System information Clangd version: Homebrew clangd version 18.1.8 Features: mac+xpc Platform: arm64-apple-darwin24.1.0

clangd extension version: v0.1.29

Operating system: macOS Sequoia 15.1 Beta

HighCommander4 commented 1 month ago

So there is in fact only one TurboModule.h file in the filesystem?

When you perform go-to-definition on <ReactCommon/TurboModule.h> vs. <ReactCommon/ReactCommon/TurboModule.h>, does clangd open the same file (full path)?

Is the definition of JSI_EXPORT in a greyed out preprocessor branch (indicating clangd believes it to be an inactive branch) in either case?

tjzel commented 1 month ago

With #include <ReactCommon/ReactCommon/TurboModule.h>:

I checked for headers with the same name and you are indeed correct. However, they both link to the same header file.

$ find . -iname TurboModule.h                                                                   
./node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h
./apps/paper-example/ios/Pods/Headers/Public/ReactCommon/ReactCommon/TurboModule.h
./apps/paper-example/ios/Pods/Headers/Private/ReactCommon/ReactCommon/TurboModule.h

$ ls -l apps/paper-example/ios/Pods/Headers/Public/ReactCommon/ReactCommon | grep TurboModule.h 
lrwxr-xr-x@ 1 bigpoppe  staff  111 Sep 25 07:58 TurboModule.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h

$ ls -l apps/paper-example/ios/Pods/Headers/Private/ReactCommon/ReactCommon | grep TurboModule.h
lrwxr-xr-x@ 1 bigpoppe  staff  111 Sep 25 07:58 TurboModule.h -> ../../../../../../../../node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h

After further investigation it turns out that when I use ReactCommon/ReactCommon/TurboModule.h it resolves to the Private directory. Therefore, that #include is incorrect in this context, since in this file I should use the Public header.

When I hovered over the problematic include it turns out it fails because the module fails to compile:

Screenshot 2024-09-25 at 11 34 15

However, the working include also yields similar result, but there's no error squiggle in the editor:

Screenshot 2024-09-25 at 13 37 36

I ran clangd on the file in isolation with --check -j=1 --log=verbose and compared the differences in output when I use <ReactCommon/TurboModule.h> (Public) and <ReactCommon/ReactCommon/TurboModule.h> (Private). Turns out there's no difference at the compilation point, as far as I can tell. I changed timestamps for easier diff.

outputPublic.log outputPrivate.log

Identifier JSI_EXPORT is defined in <jsi/jsi.h> (also duped for Private and Public). When I include this header in the file, JSI_EXPORT is not greyed out, but failed to build a module persists.

I really don't understand why failing to compile a module is ok in one case and forwards all defines, and in other it's not.

HighCommander4 commented 1 month ago

Maybe part of the issue is that clangd's support for modules is known to be incomplete (https://github.com/clangd/clangd/issues/1293)

tjzel commented 1 month ago

Maybe, but it fails to compile the module for both includes.

tjzel commented 1 month ago

Anyway, it seems as this issue should be moved to clangd instead.