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

refactor(pb) move protos to internal packages #194

Merged
merged 24 commits into from
Oct 23, 2014
Merged

refactor(pb) move protos to internal packages #194

merged 24 commits into from
Oct 23, 2014

Conversation

btc
Copy link
Contributor

@btc btc commented Oct 22, 2014

Omitted handshake because it's addressed on https://github.com/jbenet/go-ipfs/tree/dhtfixes

Omitted dht because there's a decision to be made about message.go. To move routing/dht/Message.go into the pb 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

Brian Tiger Chow added 20 commits October 22, 2014 15:54
not internal since io needs it

fix(fuse/ipns) use pb package

fix(fuse) import protos from unixfs/pb package
@btc btc added the status/in-progress In progress label Oct 22, 2014
@jbenet
Copy link
Member

jbenet commented Oct 22, 2014

@maybebtc awesome!

On dht/Message.go, yeah kill that log.

re internal packages:

Arg. i get why, but i'm so not in favor. 👎 they break what packages are for...

@whyrusleeping
Copy link
Member

👍

@btc
Copy link
Contributor Author

btc commented Oct 23, 2014

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe pb.PrivateKey

Copy link
Contributor Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-PB

Copy link
Contributor Author

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-PB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

@jbenet
Copy link
Member

jbenet commented Oct 23, 2014

A few -PB up there. otherwise LGTM! and ready to merge! 👍

@btc
Copy link
Contributor Author

btc commented Oct 23, 2014

@jbenet :shipit:

btc pushed a commit that referenced this pull request Oct 23, 2014
refactor(pb) move protos to internal packages
@btc btc merged commit d374cc6 into master Oct 23, 2014
@btc btc removed the status/in-progress In progress label Oct 23, 2014
@btc btc deleted the fix/move_proto branch October 23, 2014 05:13
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants