In some cases, like the one described here: https://bugs.swift.org/browse/SR-11901 files can depend on things defined in modules they do not import. In that case if you use sourcekit's index support, you also don't get the polluted modules back in the key.dependencies list.
To repro this I've attached the same project as the above ticket with a repro.sh script that calls sourcekitd-test (which must be in your $PATH for the script).
First build with `SWIFT_EXEC=path/to/built/swiftc swift build` then run `./repro.sh` and see the output key.dependencies. In this example it contains the modules it directly imports, but does not contain the `extender` module the `transitive` module pollutes an extension from into main.swift.
Note: the repro.sh script + sourcekit rely on the same args being used as what was used to build, this repro case could drift in the future since repro.sh duplicates the current args from swiftpm
Note: The extender module is included transitively in the key.dependencies array, but not directly (which is the issue)
The text was updated successfully, but these errors were encountered: