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

Extract: flags, delay, ds-help #4685

Merged
merged 4 commits into from
Feb 13, 2018
Merged

Conversation

hsanjuan
Copy link
Contributor

Extract: flags and thirdparty/delay and thirdparty/ds-help submodules

They have been moved to their own repositories:

History has been preserved. They have been published
with gx. Imports have been updated and re-ordered
accordingly.

License: MIT
Signed-off-by: Hector Sanjuan hector@protocol.ai

@hsanjuan hsanjuan self-assigned this Feb 12, 2018
@ghost ghost added the status/in-progress In progress label Feb 12, 2018
@magik6k
Copy link
Member

magik6k commented Feb 12, 2018

You could try to pass the low-mem flag to bitswap constructor to avoid having to create a module with 13 lines of code, which seems to be a bit of an overkill.

@hsanjuan
Copy link
Contributor Author

It is my understanding that this module was created so other modules could re-use common flags. It might be overkill because there is only one flag used by one other module, but I can only guess this was done this way for a reason, foreseeing that this could grow or at least set a precedent on how to do such things.

Any ways, I am not re-factoring code, I'm just extracting.

@whyrusleeping
Copy link
Member

Yeah, The idea is that we would have many packages reusing those flags. The initiative hasnt yet taken off, but I think we should loop back into that at some point.

@whyrusleeping
Copy link
Member

@hsanjuan gonna need a rebase

They have been moved to their own repositories:

* github.com/ipfs/go-ipfs-delay
* github.com/ipfs/go-ipfs-flags

History has been preserved. They have been published
with gx'ed. Imports have been updated and re-ordered
accordingly.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
It has been moved to its own repository:

    * github.com/ipfs/go-ipfs-ds-help

History has been preserved. It has been published
with gx. Imports have been updated and re-ordered
accordingly.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
@hsanjuan
Copy link
Contributor Author

@whyrusleeping rebased.

Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

If we intend to use the flags package in other places, then it's fine with me.

Few nitpicks, then LGTM.


"gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay"
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefix this too for consistency

@@ -7,7 +7,7 @@ import (
blockstore "github.com/ipfs/go-ipfs/blocks/blockstore"
tn "github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
datastore2 "github.com/ipfs/go-ipfs/thirdparty/datastore2"
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay"
Copy link
Member

Choose a reason for hiding this comment

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

Move to the gx/ group

cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid"
dshelp "gx/ipfs/QmdQTPWduSeyveSxeCAte33M592isSW5Z979g81aJphrgn/go-ipfs-ds-help"
"gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format"
Copy link
Member

Choose a reason for hiding this comment

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

prefix

Per @magik6k comments.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
@hsanjuan
Copy link
Contributor Author

Thanks @magik6k !

@whyrusleeping whyrusleeping merged commit 3461622 into master Feb 13, 2018
@ghost ghost removed the status/in-progress In progress label Feb 13, 2018
@whyrusleeping whyrusleeping deleted the extract/flags-delay-etc branch February 13, 2018 21:01
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