Skip to content

Commit 78cd114

Browse files
committed
stdlib: Adopt ExtensionImportVisibility experimental feature.
This didn't expose any missing imports in the sources of any of the standard library modules, but that's not entirely surprising. Still, we should have the feature enabled to test it and prevent regressions from creeping in before the behavior becomes the default. Exclude `ExtensionImportVisibility` from module interfaces.
1 parent 2af24b2 commit 78cd114

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ CONDITIONALLY_SUPPRESSIBLE_EXPERIMENTAL_FEATURE(IsolatedAny, true)
367367

368368

369369
// Whether members of extensions respect the enclosing file's imports.
370-
EXPERIMENTAL_FEATURE(ExtensionImportVisibility, true)
370+
EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE(ExtensionImportVisibility, true)
371371

372372
// Alias for IsolatedAny
373373
EXPERIMENTAL_FEATURE(IsolatedAny2, true)

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ function(_compile_swift_files
628628
list(APPEND swift_flags "-enable-experimental-feature" "NonescapableTypes")
629629
endif()
630630

631+
list(APPEND swift_flags "-enable-experimental-feature" "ExtensionImportVisiblity")
632+
631633
if (SWIFT_STDLIB_ENABLE_STRICT_CONCURRENCY_COMPLETE)
632634
list(APPEND swift_flags "-strict-concurrency=complete")
633635
endif()

0 commit comments

Comments
 (0)