Skip to content
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

Avoid use of pb.Data #5217

Closed
schomatis opened this issue Jul 12, 2018 · 4 comments
Closed

Avoid use of pb.Data #5217

schomatis opened this issue Jul 12, 2018 · 4 comments
Assignees
Labels
topic/UnixFS Topic UnixFS

Comments

@schomatis
Copy link
Contributor

Avoid direct manipulation of the UnixFS format (pb.Data) and use the FSNode abstraction instead.

Replacing all FromBytes() calls (and removing the function itself),

https://github.com/ipfs/go-ipfs/blob/a9efa7e201707bd1a0d48fe1146a76ec0097db92/unixfs/unixfs.go#L32-L40

with FSNodeFromBytes() should be a good first step,

https://github.com/ipfs/go-ipfs/blob/a9efa7e201707bd1a0d48fe1146a76ec0097db92/unixfs/unixfs.go#L153-L162

@schomatis schomatis added the topic/UnixFS Topic UnixFS label Jul 12, 2018
@schomatis schomatis added this to the Files API Documentation milestone Jul 12, 2018
@schomatis schomatis self-assigned this Jul 12, 2018
@Stebalien Stebalien added need/analysis Needs further analysis before proceeding status/ready Ready to be worked and removed need/analysis Needs further analysis before proceeding labels Jul 13, 2018
@overbool
Copy link
Contributor

@schomatis can i help you do for it?

@schomatis
Copy link
Contributor Author

Yes, go ahead!

@schomatis
Copy link
Contributor Author

@overbool After ipfs/go-unixfs#17 you could do a similar replacement process for go-ipfs here and go-mfs and I think we can close this, thanks!

@kevina
Copy link
Contributor

kevina commented Sep 21, 2018

Offhand this sounds like a good idea. But I would need to see the P.R. before I am able to give any opinion. Refactors like this are hard for me to visualize without just doing it. Also a p.r. makes sure we don't miss any corner cases.

overbool added a commit to overbool/go-ipfs that referenced this issue Sep 21, 2018
License: MIT
Signed-off-by: Overbool <[email protected]>
overbool added a commit to overbool/go-ipfs that referenced this issue Sep 21, 2018
License: MIT
Signed-off-by: Overbool <[email protected]>
overbool added a commit to overbool/go-ipfs that referenced this issue Sep 21, 2018
License: MIT
Signed-off-by: Overbool <[email protected]>
@schomatis schomatis added status/in-progress In progress and removed status/ready Ready to be worked labels Sep 23, 2018
@ghost ghost removed the status/in-progress In progress label Sep 24, 2018
Stebalien added a commit that referenced this issue Sep 24, 2018
fix(unixfs): issue #5217 (Avoid use of `pb.Data`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/UnixFS Topic UnixFS
Projects
None yet
Development

No branches or pull requests

4 participants