Ensure our project references include transitive references#55339
Ensure our project references include transitive references#55339jakebailey wants to merge 5 commits intomicrosoft:mainfrom
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. |
sandersn
left a comment
There was a problem hiding this comment.
Looks pretty good with a few suggestions
sandersn
left a comment
There was a problem hiding this comment.
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.
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.
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.