Skip to content

Why is an un-inferred dependency a warning, rather than an error, and should it stay that way? #17325

Answered by benjyw
TalAmuyal asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not convinced it is an error in every case - you could, for example, be importing from a package that you know is available at runtime. Making this an error would probably require support for dependency scopes, so we can express the idea of a "provided" dependency.

But allowing repos to opt-in (or out, eventually) of this being an error sounds like a good idea.

All that said, I'm not sure I see the correctness issue? If you had a typo, for example, then when you fix the typo that file is invalidated.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@TalAmuyal
Comment options

@thejcannon
Comment options

@thejcannon
Comment options

Comment options

benjyw
Oct 23, 2022
Maintainer Sponsor

You must be logged in to vote
1 reply
@thejcannon
Comment options

Answer selected by TalAmuyal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants