Skip to content

Conversation

@artemcm
Copy link
Contributor

@artemcm artemcm commented Dec 10, 2025

  • Add caching of unsuccessful Swift dependency lookups. Use it to avoid unnecessary re-queries of Swift dependencies during a given scanning action.
  • Re-use cached queried Clang dependency info in subsequent scanning stages. Dependency Scanning is recursive over discovered Swift module overlays. In the main 'resolveImportedModuleDependencies' routine, after all Swift and Clang dependencies of the main module are discovered, the scanner looks up Swift overlays for discovered Clang modules. For each such Swift overlay, the scanner will then proceed to call 'resolveImportedModuleDependencies' on the overlay module.
    On these subsequent recursive calls to 'resolveImportedModuleDependencies', Clang dependency resolution will re-query all imports of the overlay module which do not resolve to Swift modules, even if they had been queried previously in a parent invocation. This change adds the ability to re-use previously-queried-and-cached Clang module dependency information by having the dependency cache also store the set of visible modules which resulted from each by-name lookup.

Use it to avoid unnecessary re-queries of Swift dependencies during a given scanning action.
…subsequent scanning stages

Dependency Scanning is recursive over discovered Swift module overlays. In the main 'resolveImportedModuleDependencies' routine, after all Swift and Clang dependencies of the main module are discovered, the scanner looks up Swift overlays for discovered Clang modules. For each such Swift overlay, the scanner will then proceed to call 'resolveImportedModuleDependencies' on the overlay module.

On these subsequent recursive calls to 'resolveImportedModuleDependencies', Clang dependency resolution will re-query all imports of the overlay module which do not resolve to Swift modules, even if they had been queried previously in a parent invocation. This change adds the ability to re-use previously-queried-and-cached Clang module dependency information by having the dependency cache also store the set of visible modules which resulted from each by-name lookup.
@artemcm artemcm force-pushed the RemoveDuplicateDepScanQueries branch from fb1b9ae to 7ec791b Compare December 10, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant