Skip to content

Commit

Permalink
Enable MemberImportVisibility check - attempt 2 (#3029)
Browse files Browse the repository at this point in the history
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.

See #3021
  • Loading branch information
rnro authored Dec 17, 2024
1 parent 2d72ada commit 6008911
Show file tree
Hide file tree
Showing 26 changed files with 44 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -568,3 +568,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
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
9 changes: 9 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,14 @@ 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
#elseif canImport(Musl)
private let S_IFREG = Musl.S_IFREG
#endif

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

0 comments on commit 6008911

Please sign in to comment.