Skip to content

Conversation

@etcwilde
Copy link
Member

@etcwilde etcwilde commented Jul 3, 2025

SwiftCrypto depends on SwiftASN1 which is declared in the exports file, but does not try to find the project, resulting in build failures of downstream projects that fail to explicitly call
find_package(SwiftASN1) before find_package(SwiftCrypto).

Generally, it is recommended that project config files use find_dependency to search for the dependencies of the project they represent (https://cmake.org/cmake/help/v3.26/module/CMakeFindDependencyMacro.html). If the package is already found, either through find_package in the parent project, or through another means, the find_dependency call is a no-op.

SwiftCrypto depends on SwiftASN1 which is declared in the exports file,
but does not try to find the project, resulting in build failures of
downstream projects that fail to explicitly call
`find_package(SwiftASN1)` before `find_package(SwiftCrypto)`.

Generally, it is recommended that project config files use
`find_dependency` to search for the dependencies of the project they
represent. If the package is already found, either through
`find_package` in the parent project, or through another means, the
`find_dependency` call is a no-op.
@etcwilde
Copy link
Member Author

etcwilde commented Jul 3, 2025

CC @compnerd

Copy link
Contributor

@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.

I think that we should start following this more universally. We haven't done that in the past.

@etcwilde
Copy link
Member Author

etcwilde commented Jul 3, 2025

I think that we should start following this more universally. We haven't done that in the past.

I agree with that. It would help clean up some of the fun with dispatch and foundation too.

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Thanks for this @etcwilde!

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jul 3, 2025
@Lukasa Lukasa enabled auto-merge (squash) July 3, 2025 23:07
@Lukasa Lukasa merged commit af6be72 into apple:main Jul 3, 2025
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants