Skip to content

Commit 5c6b9c3

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 e046f2b commit 5c6b9c3

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
@@ -365,7 +365,7 @@ EXPERIMENTAL_FEATURE(ClosureIsolation, true)
365365
CONDITIONALLY_SUPPRESSIBLE_EXPERIMENTAL_FEATURE(IsolatedAny, true)
366366

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

370370
// Alias for IsolatedAny
371371
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)