mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Option to disable printing package-name in public or private interface.
Having package-name flag in non-package interfaces causes them to be built as if belonging to a package, which causes an issue for a loading client outside of the package as follows. For example, when building X that depends on A with the following dependency chain: X --> A --> B --(package-only)--> C 1. X itself is not in the same package as A, B, and C. 2. When dependency scanning X, and opening up B, because the scan target is in a different package domain, the scanner decides that B's package-only dependency on C is to be ignored. 3. When then finally building A itself, it will load its dependencies, but because the .private.swiftinterface of A still specifies -package-name, when it loads B, it will then examine its dependencies and deem that this package-only dependency on C is required. Because (2) and (3) disagree, we get an error now when building the private A textual interface. rdar://130701866
This commit is contained in:
@@ -62,6 +62,10 @@ struct ModuleInterfaceOptions {
|
||||
/// Print imports that are missing from the source and used in API.
|
||||
bool PrintMissingImports = true;
|
||||
|
||||
/// If true, package-name flag is not printed in either public or private
|
||||
/// interface file.
|
||||
bool DisablePackageNameForNonPackageInterface = false;
|
||||
|
||||
/// Intentionally print invalid syntax into the file.
|
||||
bool DebugPrintInvalidSyntax = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user