-
-
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
Extract: flags, delay, ds-help #4685
Conversation
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. |
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. |
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. |
@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>
6e1d64e
to
c9080f9
Compare
@whyrusleeping rebased. |
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.
If we intend to use the flags package in other places, then it's fine with me.
Few nitpicks, then LGTM.
exchange/bitswap/bitswap.go
Outdated
|
||
"gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay" |
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.
I'd prefix this too for consistency
exchange/bitswap/testutils.go
Outdated
@@ -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" |
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.
Move to the gx/ group
filestore/fsrefstore.go
Outdated
cid "gx/ipfs/QmcZfnkapfECQGcLZaf9B79NRg7cRa9EnZh4LSbkCzwNvY/go-cid" | ||
dshelp "gx/ipfs/QmdQTPWduSeyveSxeCAte33M592isSW5Z979g81aJphrgn/go-ipfs-ds-help" | ||
"gx/ipfs/Qmej7nf81hi2x2tvjRBF3mcp74sQyuDH4VMYDGd1YtXjb2/go-block-format" |
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.
prefix
Per @magik6k comments. License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
Thanks @magik6k ! |
Extract:
flags
andthirdparty/delay
andthirdparty/ds-help
submodulesThey 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