fix(@angular/build): watchers outside the workspace via parcel didn't work - #34187
Merged
Merged
Conversation
Collaborator
|
Thanks for the fix! Could you please fix the typos in the commit message body ( |
… work The `dirKey` entry in `this.pendingSubscriptions` caused the following `if` to never be true, as `this.isCoveredByExistingExternal(dirKey)` is always true as long as `dirKey` is in there. But at this point it isn't pending anymore, as we just `await`ed it the LoC prior. This bug caused the `else` to always run, which did `sub.unsubscribe()`, which killed the just spawned watcher. The effect was that a directory outside the workspace wasn't watched anymore. E.g. this structure: ``` apps/my-angular-app libs/my-angular-sdk node_modules/@my/sdk => symlink to libs/my-angular-sdk ``` When you ran `ng serve` in `apps/my-angular-app` (which has imports to `@my/sdk`) and made a change in `libs/my-angular-sdk`, then the watcher didn't rebuild (which it did before in 21.x).
Contributor
Author
|
Thanks. I fixed broken english in my commit message and force pushed it. |
Member
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.
The
dirKeyentry inthis.pendingSubscriptionscaused the followingifto never be true, as!this.isCoveredByExistingExternal(dirKey)is always true as long asdirKeyis in there. But at this point it isn't pending anymore, as we justawaited it the LoC prior.This bug caused to always run the else which did
sub.unsubscribe()and killed the just spawned watcher. The effect was, that a directory outside the workspace wasn't watched anymore.This worked prior to 22.2, but regressed with the switch to the parcel watcher.
See reproduction https://github.com/sod/issue-watcher