-
-
Notifications
You must be signed in to change notification settings - Fork 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
unixfs: Use only one kind of variable to refer to data types #5055
Comments
At this point I don't think we can rename the proto-buf names, so let's try to use the /cc @overbool |
@schomatis Did you mean that we should use data type under |
Yes exactly! |
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
There are a series of alias for the protocol buffer types of the
Data
message (format), in some parts of the code the alias are used (e.g.,TFile
) while in others the original variables are (e.g.,pb.Data_File
) which makes it harder to follow the code logic, these should be unified and only one kind of variable should be used.https://github.com/ipfs/go-ipfs/blob/e235d02188260a7a3df18209df1f11b6bf561483/unixfs/unixfs.go#L15-L19
https://github.com/ipfs/go-ipfs/blob/e235d02188260a7a3df18209df1f11b6bf561483/importer/helpers/dagbuilder.go#L119
https://github.com/ipfs/go-ipfs/blob/e235d02188260a7a3df18209df1f11b6bf561483/mfs/dir.go#L168
(Also the
unixfs
and theunixfs/pb
have several different import alias which makes it even harder to quickly infer from the code what are the types referring to without having to look at the import statements.)I would be inclined to remove the alias (to eliminate the possibitlity of this double reference) and simplyfiy names at the protocol buffer level in the
.proto
file (if possible, that will be discussed in a separate issue).The text was updated successfully, but these errors were encountered: