Skip to content
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

Enable MemberImportVisibility check - attempt 2 #3029

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,14 @@ if Context.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
.package(path: "../swift-system"),
]
}

// --- STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
for target in package.targets {
if target.type != .plugin {
var settings = target.swiftSettings ?? []
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
settings.append(.enableUpcomingFeature("MemberImportVisibility"))
target.swiftSettings = settings
}
}
// --- END: STANDARD CROSS-REPO SETTINGS DO NOT EDIT --- //
1 change: 1 addition & 0 deletions Sources/NIOCrashTester/CrashTests+Strict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#if !canImport(Darwin) || os(macOS)
import NIOCore
import NIOPosix

struct StrictCrashTests {
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOCrashTester/CrashTests+System.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#if !canImport(Darwin) || os(macOS)
import NIOCore
import NIOPosix
import Foundation

Expand Down
1 change: 1 addition & 0 deletions Sources/NIOMulticastChat/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CNIOLinux
glbrntt marked this conversation as resolved.
Show resolved Hide resolved
import NIOCore
import NIOPosix

Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/BaseSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOConcurrencyHelpers
import NIOCore

Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/Bootstrap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CNIOLinux
import NIOCore

#if os(Windows)
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/DatagramVectorReadManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CNIOLinux
import NIOCore

/// An object that manages issuing vector reads for datagram channels.
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/NonBlockingFileIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOConcurrencyHelpers
import NIOCore

Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/PendingDatagramWritesManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

import Atomics
import CNIOLinux
import NIOCore

private struct PendingDatagramWrite {
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/PendingWritesManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

import Atomics
import CNIOLinux
import NIOCore

private struct PendingStreamWrite {
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/SelectorEpoll.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import NIOConcurrencyHelpers
import NIOCore

#if !SWIFTNIO_USE_IO_URING
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/Socket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOCore

/// The container used for writing multiple buffers via `writev`.
Expand Down
1 change: 1 addition & 0 deletions Sources/NIOPosix/SocketChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import CNIOLinux
import NIOCore

#if os(Windows)
Expand Down
7 changes: 7 additions & 0 deletions Tests/NIOFileSystemTests/FileInfoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import XCTest
import _NIOFileSystem

Expand All @@ -23,6 +24,12 @@ import Glibc
import Android
#endif

#if canImport(Darwin)
private let S_IFREG = Darwin.S_IFREG
#elseif canImport(Glibc)
private let S_IFREG = Glibc.S_IFREG
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is probably worth calling out to reviewers

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I built this patch natively on Android without a problem, so no changes needed there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need the same for Musl as we check in a bunch of other places too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need the same for Musl

Tough to say, as the static Musl SDK doesn't let you build the tests, swiftlang/swift-docker#396.

final class FileInfoTests: XCTestCase {
private var status: CInterop.Stat {
var status = CInterop.Stat()
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOFileSystemTests/Internal/SyscallTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import SystemPackage
import XCTest
@_spi(Testing) import _NIOFileSystem
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/BlockingIOThreadPoolTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import Dispatch
import Foundation
import NIOCore
import NIOPosix
import XCTest

Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/ControlMessageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import XCTest

@testable import NIOPosix
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/NIOThreadPoolTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import Atomics
import Dispatch
import NIOConcurrencyHelpers
import NIOCore
import NIOEmbedded
import XCTest

Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/NonBlockingFileIOTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

import Atomics
import CNIOLinux
import NIOCore
import XCTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOEmbedded
import XCTest

Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/SocketAddressTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import XCTest

@testable import NIOCore
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/SocketOptionProviderTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOCore
import NIOPosix
import XCTest
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/StreamChannelsTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

import Atomics
import CNIOLinux
import NIOCore
import NIOTestUtils
import XCTest
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/SyscallAbstractionLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// This file contains a syscall abstraction layer (SAL) which hooks the Selector and the Socket in a way that we can
// play the kernel whilst NIO thinks it's running on a real OS.

import CNIOLinux
import NIOConcurrencyHelpers
import NIOCore
import XCTest
Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/SystemTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//

import CNIOLinux
import NIOCore
import XCTest

Expand Down
1 change: 1 addition & 0 deletions Tests/NIOPosixTests/ThreadTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import Dispatch
import NIOConcurrencyHelpers
import NIOCore
import XCTest

@testable import NIOPosix
Expand Down
Loading