You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-1393 [SwiftPM] Enforce Swift module import dependencies
Issue Description:
If a module X imports a module Y, then the compilation of any source code that imports module X also needs to provide search paths that lets the compiler find module Y. Unfortunately it doesn't seem possible to do this in a way that doesn't allow the source code that imports X to also import Y directly.
The Swift Package Manager would like to do this, so that only those modules that are directly declared as dependencies are available for import, regardless of any other implicit dependencies those modules have on other modules.
So this is a request for a way to provide this kind of control, either through:
a) a way to list the names of the modules (out of the set of modules findable through -I args) that are allowed to be explicitly imported by the code being compiled
or
b) a way to pass additional search paths, other than those provided by -I arguments, that will be searched only for implicit module references
Either way would work, and would allow the build system (in this case Swift Package Manager) to enforce that only modules specifically declared as dependencies are permitted to be directly imported by the source code being compiled.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: d61b3766597a6f9be201ca763390bd53
relates to:
Issue Description:
If a module X imports a module Y, then the compilation of any source code that imports module X also needs to provide search paths that lets the compiler find module Y. Unfortunately it doesn't seem possible to do this in a way that doesn't allow the source code that imports X to also import Y directly.
The Swift Package Manager would like to do this, so that only those modules that are directly declared as dependencies are available for import, regardless of any other implicit dependencies those modules have on other modules.
So this is a request for a way to provide this kind of control, either through:
a) a way to list the names of the modules (out of the set of modules findable through -I args) that are allowed to be explicitly imported by the code being compiled
or
b) a way to pass additional search paths, other than those provided by -I arguments, that will be searched only for implicit module references
Either way would work, and would allow the build system (in this case Swift Package Manager) to enforce that only modules specifically declared as dependencies are permitted to be directly imported by the source code being compiled.
The text was updated successfully, but these errors were encountered: