-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Ensure our project references include transitive references #55339
Conversation
Sheetal is the expert here, but this doesn’t seem right to me. In both of the referenced issues, users were trying to take a direct dependency on a transitive reference and were surprised that it doesn’t redirect the reference or invalidate the build when the transitively referenced project had changes. That’s not what we have.
|
That's how it feels like it should work, yeah, though #55273 (comment) seemed to imply otherwise unless I'm misunderstanding something here. |
I also think #30608 was just an ancient bug that was actually fixed?
|
From @sheetalkamat:
I think this is intended; why would it not be? If some change in |
Yeah, I guess feasibly I can just not do anything except list the things that are actually imported in each project (what I did originally) and be fine? |
Aren't we protected from accidentally importing something external without including it in |
Yes, though this PR in particular is about the opposite direction of referencing things that are unused within the project itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good with a few suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As others point out, I don't know if this is needed, but the code itself looks OK.
|
||
/** | ||
* @param {string} p | ||
* @param {Set<string>} seen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor quibble: there's no reason to pass seen
around instead of referring to it from inside getReferencesWorker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had it like that before but switched it to this. I'm not picky but I'm too not sure if this PR is still needed.
I'll just close this; if it turns into a problem again we can revive it. |
Without #30608, there's a chance that building a single project may not actually cause another to be invalidated, so we must explicitly verify that all are listed.
I also added a script which says when something's wrong.
Pulled out of #55273 (comment) since this change is unrelated.