Skip to content

Conversation

@etcwilde
Copy link
Member

@etcwilde etcwilde commented Jul 3, 2025

SwiftCrypto requires SwiftASN1. SwiftCrypto should be declaring the dependency in its import files, but is not currently doing so resulting in find_package(SwiftCrypto) failing because the SwiftASN1 target does not yet exist.
By placing find_package(SwiftASN1) before finding SwiftCrypto, we ensure that the SwiftASN1 target is populated ahead of time and finding SwiftCrypto succeeds.

The fix to the missing dependency is posted for review: apple/swift-crypto#376.
This change is to allow building SourceKit-LSP without needing a new tag on swift-crypto.

SwiftCrypto requires SwiftASN1. SwiftCrypto should be declaring the
dependency in its import files, but is not currently doing so resulting
in `find_package(SwiftCrypto)` failing because the `SwiftASN1` target
does not yet exist.
By placing `find_package(SwiftASN1)` before finding SwiftCrypto, we
ensure that the `SwiftASN1` target is populated ahead of time and
finding SwiftCrypto succeeds.
@etcwilde
Copy link
Member Author

etcwilde commented Jul 3, 2025

CC @compnerd

@etcwilde
Copy link
Member Author

etcwilde commented Jul 3, 2025

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be safe to go in before the swift-crypto change right?

@etcwilde
Copy link
Member Author

etcwilde commented Jul 3, 2025

This should be safe to go in before the swift-crypto change right?

Yes, this is so that the swift-crypto change isn't needed and I don't have to wait for a new crypto tag to bump the package versions. Once SourceKit-LSP depends on a version that is at least as new as that change, we should be able to drop the find_package(SwiftASN1) here since that will be handled by the find_package(SwiftCrypto CONFIG), unless we want to do something special.

@ahoppen
Copy link
Member

ahoppen commented Jul 4, 2025

@swift-ci Please test Windows

@ahoppen ahoppen enabled auto-merge July 4, 2025 11:17
@ahoppen ahoppen merged commit d8a2a24 into swiftlang:main Jul 4, 2025
3 checks passed
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.

4 participants