-
Notifications
You must be signed in to change notification settings - Fork 163
Create new target for common code #1331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new target for common code #1331
Conversation
|
@swift-ci please test |
|
I'm marking this as a draft while I perform a bit more compatibility testing to know if it's fine to move these public types or if we should leave a public typealias to these types instead? |
|
@swift-ci please test |
I found that we needed to add |
|
@swift-ci please test |
607d02e to
04d9cc1
Compare
|
@swift-ci please test |
|
@swift-ci please test |
| */ | ||
|
|
||
| /// A programming language. | ||
| public struct SourceLanguage: Hashable, Codable, Comparable, Sendable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you added Sendable conformance here, vs. the previous version in Sources/SwiftDocC/Model/SourceLanguage.swift. Was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can see that that was made in 04a7964 after moving the code. Conforming to Sendable here is necessary for the stricter concurrency checks in the Swift 6 language mode that the same commit enables for this new target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the SourceLanguage file that was in SwiftDocC to CommonTypeExports so that git would produce a better diff for these changes.
|
|
||
| // A few common types and core functionality that's useable by all other targets. | ||
| .target( | ||
| name: "DocCCommon", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to #1345 I added a "DocC" prefix to this target so as to not conflict with any other target in the toolchain.
|
@swift-ci please test |
Fix build after swiftlang/swift-docc#1331
Bug/issue #, if applicable:
Summary
This extracts the
SourceLanguagetypeand theinto a new "Common" target.SynchronizedtypeThe purpose of this change is to make it easier for other new code to be written in other new special purpose targets. And to be able to adopt stricter compile time checks in some new code that we can't yet enable in the full
SwiftDocCtarget.Dependencies
None.
Testing
Nothing in particular. This isn't a user facing
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added tests./bin/testscript and it succeeded[ ] Updated documentation if necessary