swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.72k stars 1.34k forks source link

Implement `fileAffectsSwiftOrClangBuildSettings` with the logic from `LLBuildManifestBuilder` #7699

Closed ahoppen closed 3 months ago

ahoppen commented 3 months ago

Instead of inspecting file extensions to decide whether a file might affect build settings, check which files are in directories that are affecting compilation. This is the same logic that LLBuildManifestBuilder uses and should be more stable. In particular, this stops us from reloading the package manifest in SourceKit-LSP when a header file is written to a .build directory.

rdar://128573306

ahoppen commented 3 months ago

https://github.com/apple/sourcekit-lsp/pull/1508

@swift-ci Please test

MaxDesiatov commented 3 months ago

@swift-ci test

MaxDesiatov commented 3 months ago

@swift-ci test windows

ahoppen commented 3 months ago

https://github.com/apple/sourcekit-lsp/pull/1508

@swift-ci Please test

ahoppen commented 3 months ago

https://github.com/apple/sourcekit-lsp/pull/1508

@swift-ci Please test

MaxDesiatov commented 3 months ago

https://github.com/apple/sourcekit-lsp/pull/1508

@swift-ci test windows