Skip to content

Add Swift Configuration#1037

Open
czechboy0 wants to merge 3 commits intoswiftlang:mainfrom
czechboy0:hd-add-swift-configuration
Open

Add Swift Configuration#1037
czechboy0 wants to merge 3 commits intoswiftlang:mainfrom
czechboy0:hd-add-swift-configuration

Conversation

@czechboy0
Copy link
Copy Markdown
Member

Pull Request Description

Add Swift Configuration to the compat suite.

Acceptance Criteria

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

  • be an Xcode or swift package manager project
  • support building on either Linux or macOS
  • target Linux, macOS, or iOS/tvOS/watchOS device
  • be contained in a publicly accessible git repository
  • maintain a project branch that builds against Swift 4.0 and passes any unit tests
  • have maintainers who will commit to resolve issues in a timely manner
  • be compatible with the latest GM/Beta versions of Xcode and swiftpm
  • add value not already included in the suite
  • be licensed with one of the following permissive licenses:
    • BSD
    • MIT
    • Apache License, version 2.0
    • Eclipse Public License
    • Mozilla Public License (MPL) 1.1
    • MPL 2.0
    • CDDL
  • pass ./project_precommit_check script run

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

@justice-adams-apple
Copy link
Copy Markdown
Collaborator

@swift-ci test

@justice-adams-apple
Copy link
Copy Markdown
Collaborator

Seeing a build failure for the project it seems

swift-configuration/.build/checkouts/swift-system/Sources/System/MachPort.swift:65:43: error: reference to var 'mach_task_self_' is not concurrency-safe because it involves shared mutable state
 63 | 
 64 |         let secret = mach_port_context_t(arc4random())
 65 |         _machPrecondition(mach_port_guard(mach_task_self_, name, secret, 0))
    |                                           `- error: reference to var 'mach_task_self_' is not concurrency-safe because it involves shared mutable state
 66 |         self._context = secret
 67 |       }

@czechboy0
Copy link
Copy Markdown
Member Author

That's in swift-system it appears - what would you recommend here?

@justice-adams-apple
Copy link
Copy Markdown
Collaborator

@swift-ci test

@justice-adams-apple
Copy link
Copy Markdown
Collaborator

@czechboy0 We'll likely need to fix the dependency project (swift-system), in this case since we're building with swift 6 looks like we would probably need to add
@preconcurrency to

import Darwin.Mach

https://github.com/apple/swift-system/blob/1.6.3/Sources/System/MachPort.swift#L12C1-L12C19

That or we change the swift build version of this project to 5 for the time being

@czechboy0
Copy link
Copy Markdown
Member Author

@parkera would it make sense to add swift-syntax to the compat suite first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants