swiftlang / swift-package-manager

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

[6.0] Don’t reload package manifest when a header is added #7692

Closed MaxDesiatov closed 3 months ago

MaxDesiatov commented 3 months ago

Cherry-pick of https://github.com/apple/swift-package-manager/pull/7691.

Explanation: Currently, any new header file causes a package reload. This means that while background indexing is writing header files into the index build directory, the package will get reloaded, which is unnecessary. Scope: isolated to known clients using this function, primarily SourceKit-LSP Risk: low, the function itself is not used in SwiftPM Testing: added a new unit test Issue: rdar://128573306 Reviewer: @ahoppen @bnbarham

MaxDesiatov commented 3 months ago

@swift-ci test