fix: consolidate isolated node/link attributes#9069
Conversation
9632d28 to
8008fb0
Compare
| children: combined, | ||
| let wrapper | ||
| /* istanbul ignore next - untested! */ | ||
| if (actualTree.isLink) { |
There was a problem hiding this comment.
This is the only "new" code path here and we are not testing a linked root tree in isolated mode.
Thank you for the heads up. For now, I would want to backport #9066 to v10. |
|
Yeah we can do another backport PR next week. I'm still iterating on this, I have more consolidation I'm doing now. |
Sounds good. Thank you. |
8977248 to
ff5e96b
Compare
|
@owlstronaut this is ready for review now. |
We are making fake versions of nodes and links in isolated mode. With this we are at least being consistent w/ the default attributes. For example `isStoreLink` was not on workspace links, but it is now.
ff5e96b to
e65ce49
Compare
|
@manzoorwanijk given #9064 I think I see now why there is a "top" attribute here that seems out of place. It's left over from before the add omits to trash list refactor. We'll want to be sure to account for that either here or when we backport this refactor to v10. |
0738b88 to
4b9d737
Compare
| } | ||
|
|
||
| get isStoreLink () { | ||
| return true |
There was a problem hiding this comment.
Hmm, won't workspace nodes pick this up?
There was a problem hiding this comment.
These are links not nodes.
There was a problem hiding this comment.
Right, sorry, that's what I meant -
is where I'm worried about the workspace links being identified as store linksThere was a problem hiding this comment.
This is purely for the _diffTree, and it helps match nodes to their actual place on disk. Workspaces ARE links.
There was a problem hiding this comment.
Agreed they are links, but I think the isStoreLink returning true will be a change in behavior for them. There is some deduplication code in rebuild
cli/workspaces/arborist/lib/arborist/rebuild.js
Lines 107 to 115 in 3b96929
There was a problem hiding this comment.
Ok I'll go make that a this attribute and only pass it in and set it where it was explicit before.
e6b75bc to
e2f5dfd
Compare
|
Those |
b04eb7b to
5137da2
Compare
5137da2 to
7bbda07
Compare
owlstronaut
left a comment
There was a problem hiding this comment.
woohoo! This is awesome
We are making fake versions of nodes and links in isolated mode. With this we are at least being consistent w/ the default attributes. For example
isStoreLinkwas not on workspace links, but it is now.@manzoorwanijk Heads up here. This is step one of the "fake Node and Link" cleanup I was talking about.