swiftlang / swift-source-compat-suite

The infrastructure and project index comprising the Swift source compatibility suite.
Apache License 2.0
284 stars 150 forks source link

Add Swift 5.10 penny-bot support #899

Closed MahdiBM closed 7 months ago

MahdiBM commented 7 months ago

Pull Request Description

We just enabled the remaining of upcoming feature flags in Penny and updated it to require Swift 5.10, so I thought it's worth updating the source-compat-suite since i've noticed Penny has caught 2-3 compatibility problems so far ever since it was added.

Also while I'm at it, update 5.9 version's SHA to the last commit which supported 5.9.

Acceptance Criteria

To be accepted into the Swift source compatibility test suite, a project must:

Ensure project meets all listed requirements before submitting a pull request.

justice-adams-apple commented 7 months ago

@swift-ci test

MahdiBM commented 7 months ago

Please let me know if i need to do something πŸ™‚. Looking at the logs i didn't notice anything specific i could do. Possibly because my lack of understanding of how to read the logs.

justice-adams-apple commented 7 months ago

@MahdiBM seeing

/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-test-macOS/swift-source-compat-suite/project_cache/penny-bot/Lambdas/GitHubAPI/+Client.swift:6:25: error: method cannot be declared package because its parameter uses an internal type
 1 β”‚ import AsyncHTTPClient
   β”‚ ╰─ note: class 'HTTPClient' imported as 'internal' from 'AsyncHTTPClient' here
 2 β”‚ import Logging
 3 β”‚ import struct NIOCore.TimeAmount
 4 β”‚ 
 5 β”‚ extension Client {
 6 β”‚     package static func makeForGitHub(
   β”‚                         ╰─ error: method cannot be declared package because its parameter uses an internal type
 7 β”‚         httpClient: HTTPClient,
 8 β”‚         authorization: AuthorizationHeader,

/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-test-macOS/swift-source-compat-suite/project_cache/penny-bot/.build/checkouts/async-http-client/Sources/AsyncHTTPClient/HTTPClient.swift:67:14: note: type declared here
  65 β”‚ ///     try client.syncShutdown()
  66 β”‚ /// ```
  67 β”‚ public class HTTPClient {
     β”‚              ╰─ note: type declared here
  68 β”‚     /// The `EventLoopGroup` in use by this ``HTTPClient``.
  69 β”‚     ///

<unknown>:0: note: type declared here
/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-test-macOS/swift-source-compat-suite/project_cache/penny-bot/Lambdas/GitHubAPI/GeneratedSources/Client.swift:25:13: error: initializer cannot be declared package because its parameter uses an internal type
   6 β”‚ @preconcurrency import struct Foundation.Date
   7 β”‚ #else
   8 β”‚ import struct Foundation.URL
     β”‚ ╰─ note: module 'Foundation' imported as 'internal' from 'Foundation' here
   9 β”‚ import struct Foundation.Data
  10 β”‚ import struct Foundation.Date
     ┆
  23 β”‚     ///   - transport: A transport that performs HTTP operations.
  24 β”‚     ///   - middlewares: A list of middlewares to call before the transport.
  25 β”‚     package init(
     β”‚             ╰─ error: initializer cannot be declared package because its parameter uses an internal type
  26 β”‚         serverURL: Foundation.URL,
  27 β”‚         configuration: Configuration = .init(),

<unknown>:0: note: type declared here
/Users/ec2-user/jenkins/workspace/swift-PR-source-compat-suite-test-macOS/swift-source-compat-suite/project_cache/penny-bot/Lambdas/GitHubAPI/GeneratedSources/Types.swift:1230:25: error: method cannot be declared package because its result uses an internal type
    6 β”‚ @preconcurrency import struct Foundation.Date
    7 β”‚ #else
    8 β”‚ import struct Foundation.URL
      β”‚ ╰─ note: module 'Foundation' imported as 'internal' from 'Foundation' here
    9 β”‚ import struct Foundation.Data
   10 β”‚ import struct Foundation.Date
      ┆
 1228 β”‚ /// Server URLs defined in the OpenAPI document.
 1229 β”‚ package enum Servers {
 1230 β”‚     package static func server1() throws -> Foundation.URL {
      β”‚                         ╰─ error: method cannot be declared package because its result uses an internal type
 1231 β”‚         try Foundation.URL(
 1232 β”‚             validatingOpenAPIServerURL: "https://api.github.com",

I believe this is due to the use of InternalImportsByDefault

MahdiBM commented 7 months ago

I'll close this for now since I'll need to update swift-openapi-generator and Penny for that feature flag first (which I should and probably will do both). Currently on vacation so could take a few weeks before i get to it.