Open DmT021 opened 1 year ago
Here's an example of that idea https://github.com/lyft/swift-index-store/pull/43 although it would require some tweaking to be production ready.
I think one thing we've discovered with this tool is it seems sufficiently difficult to ever be 100% correct, but for this case maybe that's ok
There was a pitch recently on the swift forum about introduction new visibility levels on imports (ex @_implementationOnly imports).
internal
and lower levels of imports are useful to reduce number of modules to be rebuild in incremental builds. But there is no way suggested in the proposal to automate or assist with import visibility lowering. However it was suggested that the swift index store could be used to get the information about dependencies between entities in different modules. So with the index store it's possible to build a report of connectivity level between modules, which in turn will be a valuable tool to plan work for specifying import visibilities.