Skip to content

Commit

Permalink
Add missing imports to fix Swift 6.1+ (#709)
Browse files Browse the repository at this point in the history
### Motivation

Currently unit tests on Swift 6.1+ toolchains are failing due to a few
missing imports.

That these are coming up is good, that's why we've enabled
`MemberImportVisibility`.

### Modifications

Add the missing imports to stop relying on implicitly imported extension
methods.

### Result

Unit tests compile again on Swift 6.1+.

### Test Plan

Tested locally, will further verify CI is happy.
  • Loading branch information
czechboy0 authored Jan 6, 2025
1 parent 6593b1b commit f3c32cc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_enabled: false
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

integration-test:
name: Integration test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import Foundation

extension Int {
/// Returns the digits for the number using the specified radix.
/// - Parameter radix: The radix used to format the integer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import OpenAPIKit
import Foundation

/// A structure that contains the information about an OpenAPI object that is
/// required to generate a matching Swift structure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import OpenAPIKit
import Foundation

/// Utilities for asking questions about OpenAPI.Content
extension FileTranslator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import OpenAPIKit
import Foundation

/// Represents a server variable and the function of generation that should be applied.
protocol ServerVariableGenerator {
Expand Down

0 comments on commit f3c32cc

Please sign in to comment.