mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #74302 from nkcsgexi/revert-pkg-export
Revert recent changes for exportability for package declarations
This commit is contained in:
@@ -2301,32 +2301,32 @@ ERROR(pattern_type_not_usable_from_inline,none,
|
||||
"type referenced from a '@usableFromInline' "
|
||||
"%select{%select{variable|constant}0|property}1 "
|
||||
"must be '@usableFromInline' or public",
|
||||
(bool, bool, /*ignored*/bool))
|
||||
(bool, bool))
|
||||
WARNING(pattern_type_not_usable_from_inline_warn,none,
|
||||
"type referenced from a '@usableFromInline' "
|
||||
"%select{%select{variable|constant}0|property}1 "
|
||||
"should be '@usableFromInline' or public",
|
||||
(bool, bool, /*ignored*/bool))
|
||||
(bool, bool))
|
||||
ERROR(pattern_type_not_usable_from_inline_frozen,none,
|
||||
"type referenced from a stored property in a '@frozen%select{| package}2' struct must "
|
||||
"be '@usableFromInline'%select{ or public|, public, or package}2",
|
||||
(/*ignored*/bool, /*ignored*/bool, bool))
|
||||
"type referenced from a stored property in a '@frozen' struct must "
|
||||
"be '@usableFromInline' or public",
|
||||
(/*ignored*/bool, /*ignored*/bool))
|
||||
ERROR(pattern_type_not_usable_from_inline_inferred,none,
|
||||
"type referenced from a '@usableFromInline' "
|
||||
"%select{%select{variable|constant}0|property}1 "
|
||||
"with inferred type %2 "
|
||||
"must be '@usableFromInline' or public",
|
||||
(bool, bool, Type, /*ignored*/bool))
|
||||
(bool, bool, Type))
|
||||
WARNING(pattern_type_not_usable_from_inline_inferred_warn,none,
|
||||
"type referenced from a '@usableFromInline' "
|
||||
"%select{%select{variable|constant}0|property}1 "
|
||||
"with inferred type %2 "
|
||||
"should be '@usableFromInline' or public",
|
||||
(bool, bool, Type, /*ignored*/bool))
|
||||
(bool, bool, Type))
|
||||
ERROR(pattern_type_not_usable_from_inline_inferred_frozen,none,
|
||||
"type referenced from a stored property with inferred type %2 in a "
|
||||
"'@frozen%select{| package}3' struct must be '@usableFromInline'%select{ or public|, public, or package}3",
|
||||
(/*ignored*/bool, /*ignored*/bool, Type, bool))
|
||||
"'@frozen' struct must be '@usableFromInline' or public",
|
||||
(/*ignored*/bool, /*ignored*/bool, Type))
|
||||
|
||||
ERROR(pattern_binds_no_variables,none,
|
||||
"%select{property|global variable}0 declaration does not bind any "
|
||||
@@ -3648,8 +3648,6 @@ ERROR(decl_from_hidden_module,none,
|
||||
"cannot use %kind0 %select{here|as property wrapper here|"
|
||||
"as result builder here|"
|
||||
"in an extension with public or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances|"
|
||||
"in an extension with public, package, or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances}1; "
|
||||
"%select{%2 has been imported as implementation-only|"
|
||||
"it is an SPI imported from %2|"
|
||||
@@ -3657,17 +3655,13 @@ ERROR(decl_from_hidden_module,none,
|
||||
"%2 was imported for SPI only|"
|
||||
"%2 was not imported by this file|"
|
||||
"C++ types from imported module %2 do not support library evolution|"
|
||||
"%2 was not imported publicly|"
|
||||
"%2 was imported as package}3"
|
||||
"%select{||||| or as package| or as package}1",
|
||||
"%2 was not imported publicly}3",
|
||||
(const Decl *, unsigned, Identifier, unsigned))
|
||||
ERROR(typealias_desugars_to_type_from_hidden_module,none,
|
||||
"%0 aliases '%1.%2' and cannot be used %select{here|"
|
||||
"as property wrapper here|"
|
||||
"as result builder here|"
|
||||
"in an extension with public or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances|"
|
||||
"in an extension with public, package, or '@usableFromInline' members|"
|
||||
"in an extension with conditional conformances}3 "
|
||||
"because %select{%4 has been imported as implementation-only|"
|
||||
"it is an SPI imported from %4|"
|
||||
@@ -3675,8 +3669,7 @@ ERROR(typealias_desugars_to_type_from_hidden_module,none,
|
||||
"%4 was imported for SPI only|"
|
||||
"%4 was not imported by this file|"
|
||||
"C++ types from imported module %4 do not support library evolution|"
|
||||
"%4 was not imported publicly|"
|
||||
"%4 was imported as package}5",
|
||||
"%4 was not imported publicly}5",
|
||||
(const TypeAliasDecl *, StringRef, StringRef, unsigned, Identifier, unsigned))
|
||||
ERROR(conformance_from_implementation_only_module,none,
|
||||
"cannot use conformance of %0 to %1 %select{here|as property wrapper here|"
|
||||
@@ -3689,8 +3682,7 @@ ERROR(conformance_from_implementation_only_module,none,
|
||||
"%3 was imported for SPI only|"
|
||||
"%3 was not imported by this file|"
|
||||
"C++ types from imported module %3 do not support library evolution|"
|
||||
"%3 was not imported publicly|"
|
||||
"%3 was imported as package}4",
|
||||
"%3 was not imported publicly}4",
|
||||
(Type, Identifier, unsigned, Identifier, unsigned))
|
||||
NOTE(assoc_conformance_from_implementation_only_module,none,
|
||||
"in associated type %0 (inferred as %1)", (Type, Type))
|
||||
@@ -6928,8 +6920,7 @@ ERROR(inlinable_decl_ref_from_hidden_module,
|
||||
"%2 was imported for SPI only|"
|
||||
"%2 was not imported by this file|"
|
||||
"C++ APIs from imported module %2 do not support library evolution|"
|
||||
"%2 was not imported publicly|"
|
||||
"%2 was imported as package}3",
|
||||
"%2 was not imported publicly}3",
|
||||
(const ValueDecl *, unsigned, Identifier, unsigned))
|
||||
|
||||
WARNING(inlinable_decl_ref_from_hidden_module_warn,
|
||||
@@ -6947,8 +6938,7 @@ ERROR(inlinable_typealias_desugars_to_type_from_hidden_module,
|
||||
"%4 was imported for SPI only|"
|
||||
"%4 was not imported by this file|"
|
||||
"C++ types from imported module %4 do not support library evolution|"
|
||||
"%4 was not imported publicly|"
|
||||
"%4 was imported as package}5",
|
||||
"%4 was not imported publicly}5",
|
||||
(const TypeAliasDecl *, StringRef, StringRef, unsigned, Identifier, unsigned))
|
||||
|
||||
NOTE(missing_import_inserted,
|
||||
@@ -6962,8 +6952,8 @@ ERROR(availability_macro_in_inlinable, none,
|
||||
#undef FRAGILE_FUNC_KIND
|
||||
|
||||
NOTE(resilience_decl_declared_here,
|
||||
none, "%kind0 is not '@usableFromInline'%select{ or public|, public, or package}1",
|
||||
(const ValueDecl *, bool))
|
||||
none, "%kind0 is not '@usableFromInline' or public",
|
||||
(const ValueDecl *))
|
||||
|
||||
ERROR(class_designated_init_inlinable_resilient,none,
|
||||
"initializer for class %0 is "
|
||||
|
||||
@@ -435,10 +435,6 @@ public:
|
||||
void setImportUsedPreconcurrency(
|
||||
AttributedImport<ImportedModule> import);
|
||||
|
||||
/// True if the highest access level of the declarations referencing
|
||||
/// this import in signature or inlinable code is internal or less.
|
||||
bool isMaxAccessLevelUsingImportInternal(AttributedImport<ImportedModule> import) const;
|
||||
|
||||
/// Return the highest access level of the declarations referencing
|
||||
/// this import in signature or inlinable code.
|
||||
AccessLevel
|
||||
|
||||
Reference in New Issue
Block a user