Skip to content

Fix prepareDependencies when using TestDependencyKey. #315

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

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

mbrandonw
Copy link
Member

Currently prepareDependencies does not work for dependencies that only have a TestDependencyKey conformance. This fixes that.

if
context == .live,
!DependencyValues.isSetting,
!(cached[cacheKey] != nil && cached[cacheKey]?.preparationID != nil),
Copy link
Member Author

Choose a reason for hiding this comment

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

We do not need to warn if there is something in the cache that came from preparing dependencies.

@mbrandonw mbrandonw merged commit 5526c8a into main Dec 3, 2024
6 checks passed
@mbrandonw mbrandonw deleted the fix-prepare-dependencies branch December 3, 2024 16:20
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