fix(mfs): preserve CidBuilder object in setNodeData(), Mkdir() and NewRoot()#1125
Open
davidebeatrici wants to merge 3 commits intoipfs:mainfrom
Open
fix(mfs): preserve CidBuilder object in setNodeData(), Mkdir() and NewRoot()#1125davidebeatrici wants to merge 3 commits intoipfs:mainfrom
davidebeatrici wants to merge 3 commits intoipfs:mainfrom
Conversation
davidebeatrici
commented
Mar 23, 2026
Comment on lines
-395
to
-398
| // hector: no idea why this option is overridden, but it must be to | ||
| // keep backwards compatibility. CidBuilder from the options is | ||
| // manually set in `Mkdir` (ops.go) though. | ||
| opts.CidBuilder = d.GetCidBuilder() |
Author
There was a problem hiding this comment.
Or rather:
if opts.CidBuilder == nil {
opts.CidBuilder = d.GetCidBuilder()
}
davidebeatrici
commented
Mar 23, 2026
Comment on lines
176
to
184
| // opts to make the parents leave MkParents and Flush as false. | ||
| parentsOpts := MkdirOpts{ | ||
| CidBuilder: opts.CidBuilder, | ||
| MaxLinks: opts.MaxLinks, | ||
| MaxHAMTFanout: opts.MaxHAMTFanout, | ||
| HAMTShardingSize: opts.HAMTShardingSize, | ||
| SizeEstimationMode: opts.SizeEstimationMode, | ||
| Chunker: opts.Chunker, | ||
| } |
Author
There was a problem hiding this comment.
The comment implies we can copy the entire struct object and then just set MkParents and Flush to false. Should we do that?
davidebeatrici
commented
Mar 23, 2026
Comment on lines
372
to
377
| return d.MkdirWithOpts(name, MkdirOpts{ | ||
| CidBuilder: d.unixfsDir.GetCidBuilder(), | ||
| MaxLinks: d.unixfsDir.GetMaxLinks(), | ||
| MaxHAMTFanout: d.unixfsDir.GetMaxHAMTFanout(), | ||
| HAMTShardingSize: d.unixfsDir.GetHAMTShardingSize(), | ||
| }) |
Author
There was a problem hiding this comment.
Should we set SizeEstimationMode as well?
lidel
reviewed
Mar 24, 2026
Member
lidel
left a comment
There was a problem hiding this comment.
This needs in-depth review but dropping quick comment that this needs a PR in kubo that uses this branch to detect any regression in downstream projects
Author
|
Thank you, I'll do that as soon as I completely fix ipfs/kubo#11247. I have to add a commit that fixes the file-specific issue to this pull request. |
614b36f to
e79825c
Compare
e79825c to
7df5f5b
Compare
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.
No description provided.