-
-
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
refactor(pb) move protos to internal packages #194
Conversation
not internal since io needs it fix(fuse/ipns) use pb package fix(fuse) import protos from unixfs/pb package
@maybebtc awesome! On
Arg. i get why, but i'm so not in favor. 👎 they break what packages are for... |
👍 |
I <3 that doing so reduces the API footprint and makes the system more approachable. The directory structure provides hints about what packages comprise important top-level components and which are merely supplementary. I haven't spent time in the npm community, so I assume my cost-benefit analysis is missing some valuable empirical results. If internal packages drive the community toward a suboptimal convention or, for another reason, you'd prefer to avoid them, feel free to veto. It's a quick change. |
@@ -220,14 +221,14 @@ func UnmarshalPublicKey(data []byte) (PubKey, error) { | |||
} | |||
|
|||
func UnmarshalPrivateKey(data []byte) (PrivKey, error) { | |||
pmes := new(PBPrivateKey) | |||
pmes := new(pb.PBPrivateKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe pb.PrivateKey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
} | ||
|
||
func (s *Node) loadData() error { | ||
s.cached = new(ft.PBData) | ||
s.cached = new(ftpb.PBData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-PB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
return fuse.Attr{Mode: os.ModeDir | 0555} | ||
case ft.PBData_File, ft.PBData_Raw: | ||
case ftpb.PBData_File, ftpb.PBData_Raw: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-PB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
A few |
refactor(pb) move protos to internal packages
Omitted
handshake
because it's addressed on https://github.com/jbenet/go-ipfs/tree/dhtfixesOmitted
dht
because there's a decision to be made about message.go. To move routing/dht/Message.go into thepb
package with the protos, would need to remove the logging statement shown below. If y'all are cool with this, I'll go ahead and make the change. I'm reluctant to make functional changes for the sake of style. Hence, the omission.https://github.com/jbenet/go-ipfs/blob/fix/move_proto/routing/dht/Message.go#L56
re internal packages:
https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit