Skip to content

Enable MemberImportVisibility upcoming feature in Foundation #1280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025

Conversation

parkera
Copy link
Contributor

@parkera parkera commented May 2, 2025

Enable the MemberImportVisibility compiler flag, which ensures that we don't accidentally depend on implicit imports in our sources.

@parkera parkera requested a review from jmschonfeld May 2, 2025 18:03
@parkera
Copy link
Contributor Author

parkera commented May 2, 2025

@swift-ci test

@parkera parkera merged commit 3f661c1 into swiftlang:main May 2, 2025
15 checks passed
@marcprux
Copy link
Contributor

marcprux commented May 2, 2025

I think this may have broken my hourly Android build (for 6.1 and 6.2-nightly, but not 6.0): https://github.com/swift-everywhere/swift-package-builds/actions/runs/14801693208/job/41561703634#step:32:2259. Does this look like it could be plausibly related to the StrictConcurrency change?

/home/runner/work/swift-package-builds/swift-package-builds/swift-foundation/Sources/FoundationEssentials/Error/CocoaError+FilePath.swift:76:37: error: initializer 'init(rawValue:)' is not available due to missing import of defining module 'Android'
 18 | #elseif canImport(Bionic)
 19 | @preconcurrency import Bionic
 20 | #elseif canImport(Glibc)
    | `- note: add import of module 'Android'
 21 | @preconcurrency import Glibc
 22 | #elseif canImport(Musl)
    :
 74 |         // (130280235) POSIXError.Code does not have a case for EOPNOTSUPP
 75 |         guard errno != EOPNOTSUPP else { return nil }
 76 |         guard let code = POSIXError.Code(rawValue: errno) else {
    |                                     `- error: initializer 'init(rawValue:)' is not available due to missing import of defining module 'Android'
 77 |             fatalError("Invalid posix errno \(errno)")
 78 |         }

Replacing #elseif canImport(Bionic) @preconcurrency import Bionic with #elseif canImport(Android) @preconcurrency import Android does fix the issue, but I'm curious what might have triggered that.

@marcprux
Copy link
Contributor

marcprux commented May 2, 2025

cc: @finagolfin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants