Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Category A (tools-version 6.2 + macOS 26 min): macos-26 + Swift 6.2
# Category B (tools-version 6.2 + older macOS): macos-15 + 6.2, macos-26 + 6.2
# Category C (tools-version 6.0): macos-15 + 6.1, macos-15 + 6.3, macos-26 + 6.3
# Linux (if viable): ubuntu + Swift 6.1, ubuntu + Swift 6.3
# Linux: ubuntu + Swift 6.1, ubuntu + Swift 6.3
#
# When Swift 6.4 ships: bump 6.1→6.2 and 6.3→6.4 in Category C
# When bumping tools-version to 6.2: drop 6.0/6.1, move to Category A or B
Expand Down Expand Up @@ -33,6 +33,10 @@ jobs:
swift: "6.3"
- os: macos-26
swift: "6.3"
- os: ubuntu-latest
swift: "6.1"
- os: ubuntu-latest
swift: "6.3"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Expand All @@ -45,11 +49,10 @@ jobs:
run: swift test -v
lint:
name: Run SwiftLint
runs-on: macos-latest
runs-on: ubuntu-latest
container: ghcr.io/realm/swiftlint:latest
steps:
- uses: actions/checkout@v6
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
run: swiftlint --strict
swift-format:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
build:
name: Generate Documentation
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: SwiftyLab/setup-swift@latest
Expand Down
8 changes: 6 additions & 2 deletions Sources/SwiftNASR/Distribution/DirectoryDistribution.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public final class DirectoryDistribution: Distribution {
do {
handle = try FileHandle(forReadingFrom: fileURL)
} catch let error as NSError {
if error.domain == NSCocoaErrorDomain && error.code == NSFileNoSuchFileError {
if error.domain == NSCocoaErrorDomain,
error.code == NSFileNoSuchFileError || error.code == NSFileReadNoSuchFileError
{
throw Error.noSuchFile(path: path)
}
throw error
Expand Down Expand Up @@ -131,7 +133,9 @@ public final class DirectoryDistribution: Distribution {
do {
handle = try FileHandle(forReadingFrom: fileURL)
} catch let error as NSError {
if error.domain == NSCocoaErrorDomain && error.code == NSFileNoSuchFileError {
if error.domain == NSCocoaErrorDomain,
error.code == NSFileNoSuchFileError || error.code == NSFileReadNoSuchFileError
{
throw Error.noSuchFile(path: path)
}
throw error
Expand Down
3 changes: 3 additions & 0 deletions Sources/SwiftNASR/Downloaders/ArchiveDataDownloader.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/**
A downloader that downloads a distribution archive into memory. No data is
Expand Down
3 changes: 3 additions & 0 deletions Sources/SwiftNASR/Downloaders/ArchiveFileDownloader.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/**
A downloader that downloads a distribution archive to a file on disk.
Expand Down
7 changes: 6 additions & 1 deletion Sources/SwiftNASR/Downloaders/Downloader.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/**
A downloader is a class that can download a NASR distribution from the FAA's
Expand Down Expand Up @@ -37,7 +40,9 @@ public protocol Downloader: Loader {
func load(withProgress progressHandler: @Sendable (Progress) -> Void) async throws -> Distribution
}

@objc
#if canImport(Darwin)
@objc
#endif
final class DownloadDelegate: NSObject, URLSessionDownloadDelegate, Sendable {
let progress = Progress(totalUnitCount: 0)

Expand Down
Loading
Loading