-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Collections] Tighten import conditions #3296
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
Conversation
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@@ -1224,6 +1328,10 @@ final class PackageCollectionsTests: XCTestCase { | |||
try XCTSkipIf(true) | |||
#endif | |||
|
|||
if !PackageCollections.isSupportedPlatform { | |||
try XCTSkipIf(true) |
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.
try XCTSkipIf(!PackageCollections.isSupportedPlatform)
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 think there is a way in XCTest to apply such rules to all tests in the class, which may be easier. @neonichu do you remember how?
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.
Not aware of anything tbh
@@ -14,6 +14,13 @@ import TSCBasic | |||
|
|||
// TODO: is there a better name? this conflicts with the module name which is okay in this case but not ideal in Swift | |||
public struct PackageCollections: PackageCollectionsProtocol { | |||
// Check JSONPackageCollectionProvider.isSignatureCheckSupported before updating or removing this |
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.
👍
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 wonder if there is a way to exclude the entire PackageCollections module in unsupported platforms. not sure if easier / harder but if easy may hep to keep the code simpler and move the complexity there
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.
cc @neonichu may know of a way
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.
In principle, we could use conditional dependencies, might need some reorganization because I think right now some of the collections targets are also directly included in products.
looks good, some ideas/thought on how to simplify this but its good either way. |
8a74a06
to
51dd952
Compare
@swift-ci please smoke test |
51dd952
to
6559f39
Compare
@swift-ci please smoke test |
Some `Security` framework APIs are available on macOS only
6559f39
to
c3089f9
Compare
@swift-ci please smoke test |
Some
Security
framework APIs are available on macOS only