Fix bug with phantom transitive dependencies#1031
Open
christiango wants to merge 7 commits intomasterfrom
Open
Fix bug with phantom transitive dependencies#1031christiango wants to merge 7 commits intomasterfrom
christiango wants to merge 7 commits intomasterfrom
Conversation
ecraig12345
requested changes
Mar 3, 2026
Member
ecraig12345
left a comment
There was a problem hiding this comment.
As discussed in chat, this needs some additional logic to ensure the target isn't defined in some other way besides as a script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch fixes a bug where transitive (^^) and topological (^) dependency expansion would pull in "phantom" targets — targets created for packages that don't actually define the referenced script. When those phantom targets are later removed by remove nodes their same-package dependencies get re-wired to the dependents, creating spurious cross-package edges that weren't intended.
The internal repo issue that caused this change has the following behavior we have a repo that is onboarding to typescript isolated declarations to improve build times. With this change we have transpile and typecheck steps. Today typecheck is defined with ^typecheck, meaning all dependencies are typechecked before the current package is typechecked. With isolated declarations we can emit all the d.ts files during transpile and typecheck can instead start when all dependents have produced d.ts. Since isolatedDeclarations is being rolled out slowly in the repo we have the following configuration to support a mix of packages with isolated declarations:
The lage config dependencies are:
transpile: [],
emitDeclarations: [typecheck],
typecheck: [^^emitDeclarations, ^^typecheck]
Before this change we were seeing that packages were incorrectly blocking on the typecheck step of any package that uses isolatedDelcarations. Now we do the correc thing