Closed tyler-french closed 1 month ago
nit: maybe add a period and space before "Please"? Warning once per rule makes sense, I wasn't sure offhand how to do that. can we have a map at module scope of "rule name" -> "has warned"? Or will starlark prevent that?
@dzbarsky Yeah, I'm not sure how to do it without some global state, which I don't think we'd want anyway, because it would probably mess up some caching logic or determinism somewhere.
There is no way to warn once, but at least most of the warnings should go away as soon as the user starts migrating individual resolve
functions.
It's difficult to tell where this issue is coming from without some reference to the resolver or the target this is originating from.
This PR updates the debug message to be more explicit.
Before:
After:
Also this prints 1000s of messages. Is this overkill? Can we just warn once per rule?