Tags: MobileNativeFoundation/index-import
Tags
Update for Swift 6.1 hash algorithm change (#131) Fixes #120. Swift 6.1 changes the hash algorithm to BLAKE3, this change is not backwards compatible as we need to build with swiftlang/llvm-project (Swift 6.1 release). Projects that need to support all Swift 6.x (Xcode 16.0-16.2) can use both binaries (before and after this PR). Signed-off-by: Luis Padron <[email protected]>
Revert "Absolutize paths after remapping (#91)" (#93) Absolutizing these paths resulted in failures with symlinks downstream. Resolving those symlinks seems to work but in the case you're trying to remap from 1 location to another not for Xcode, which rules_swift does if you use the `swift.use_global_index_store` you actually need the paths to still be relative in the units. This reverts commit 431d4e5. Signed-off-by: Keith Smiley <[email protected]>
Absolutize paths after remapping (#91) The index store library requires paths being written are absolute. If we don't absolutize them then it does. Unfortunately its logic for that computes the PWD for every single path, which can amount to ~5% of the total time spent in index-import. Signed-off-by: Keith Smiley <[email protected]>
Import based on compilation outputs (#53) This PR adds the capability to import output files from a compilation: to improve performance and experiment with using a "global shared index" while remote caching a subset for lib. The github issue has some overall mentions of this bazelbuild/rules_swift#561 Index while building is performant in clang and swift becauase it conditionally writes data based on files in a global index cache reused across all clang/swift invocations in the build. The overhead of 3-5% performance hit in the whitepaper of "Index while building" was hinged on the fact it'd be using a global index cache. With the per library index as rules_swift implemented this feature, "Index while building" adds a 300% increase in build times in my testing. Longer term, can add flags to clang and swift indexing to be aware of remote compilation and caching, this is a quick hack incase that doesn't ever happen. Remote build possibilities: The plan is to be able to use a global index on compilation fix compilation performance and minimize the O ( M imports * N modules ) disk usage. I'd then intend to use this code to import a subset of the global index material into the remote cache by putting it in `bazel-out` at `swift_library`'s "index-store" path. Eventually a feature can be added to rules_cc following the same pattern for .m, .cpp Local build possibilities: I plan to import swift_library cache remote cache hits from `bazel-out` into Xcode's index. However, importing output files as a capability is useful even if that doesn't play out: if we orient index-import around output files, then it doesn't have to enumerate and process an entire index ever again. Another build related program ran aas an aspect or via BEP could read outputs and then invoke index-import with these outputs.
PreviousNext