-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Correctly remove orphaned non-tree subgraphs #7927
Conversation
Benchmark ResultsKitchen Sink 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. AtlasKit Editor 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
|
@lettertwo @thebriando What do you think about removing some of these assertions in |
I was wondering this, too. I think we already do silent no-ops for the inverse operations ( |
Yep that makes sense to me as well. |
I did find this old PR: #3562, but I'm not sure if the context around it is still relevant. /cc @wbinnssmith |
Co-authored-by: Will Binns-Smith <wbinnssmith@atlassian.com>
This reverts commit 4940b57.
eb30133
to
0d1faea
Compare
↪️ Pull Request
removeNode(1)
first removes 0-1, then 1-2 (because 2 is an orphan), then 2-3 (because 2 is an orphan after 0-1 was removed). The the right branch is visited and 2-3 is removed again which failsI think it makes more sense to first remove the outgoing edges and then the incoming edges. This way, the subgraph is removed bottom up and a nodes becomes only orphaned once the last parent of that node is removed. So there will always be exactly one anchestor node that is responsible for removing it and no double deletion as before.
💻 Examples
The asset graph looked like this, changing some target option in package.json would remove the subgraph and run into a
Edge from x to y not found
error.