Skip to content

Commit 44f87ce

Browse files
authored
ci: Enable Swift 6 Language Mode checks (#7)
### Motivation Much of the project passes the Swift 6 language mode checks, so we should run them on each pull request to prevent regressions. ### Modifications Enable the Swift 6 language mode check job in the pull request workflow and fix the errors it finds. ### Result The Swift 6 checks will pass. ### Test Plan Ran the checks locally using `act pull_request`.
1 parent 1ae5ba7 commit 44f87ce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/pull_request.yml

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ jobs:
1313
docs_check_container_image: "swift:6.0-noble"
1414
license_header_check_project_name: "SwiftContainerPlugin"
1515
shell_check_container_image: "swift:6.0-noble"
16+
17+
swift-6-language-mode:
18+
name: Swift 6 Language Mode
19+
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main

Vendor/github.com/apple/swift-package-manager/Sources/Basics/AuthorizationProvider.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public final class NetrcAuthorizationProvider: AuthorizationProvider {
7878

7979
private static func load(_ path: URL) throws -> Netrc? {
8080
do {
81-
let content = try? String(contentsOf: path)
81+
let content = try? String(contentsOf: path, encoding: .utf8)
8282
return try NetrcParser.parse(content ?? "")
8383
} catch NetrcError.machineNotFound {
8484
// Thrown by parse() if .netrc is empty.

0 commit comments

Comments
 (0)