-
Notifications
You must be signed in to change notification settings - Fork 467
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
fix dependency issues, for now #695
Conversation
I've avoided dealing with the issue of having two different cbor packages for now, by using sed to replace the cbor hashes with the version of it that we actually want. This is a hack, but it will suffice until we get the cbor changes merged up properly |
} | ||
|
||
size, ok := types.NewBytesAmountFromString(req.Arguments[0], 10) | ||
if !ok { | ||
return ErrInvalidSize | ||
re.SetError(ErrInvalidSize, cmdkit.ErrNormal) |
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.
missing return
types/bytes_amount.go
Outdated
@@ -4,9 +4,9 @@ import ( | |||
"encoding/json" | |||
"math/big" | |||
|
|||
cbor "gx/ipfs/QmRiRJhn427YVuufBEHofLreKWNw7P7BWNq86Sb9kzqdbd/go-ipld-cbor" | |||
"github.com/syndtr/goleveldb/leveldb/errors" |
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.
is removing this from gx on purpose?
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.
not on purpose, it just appears that its not in our dependency tree (it previously was imported indirectly by go-ipfs). Also not sure why we're depending on a leveldb errors package here...
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.
someone probably used go-imports. Gx did the right thing here pointing this out
d98d6ba
to
57b2c54
Compare
It looks like one of our tests is broken because it expected a certain error string from libp2p that has since been changed. Can someone take a hack at fixing this for me? I won't be able to do so for a few days, and would really like to avoid having to rebase this monstrocity.... |
57b2c54
to
22ca311
Compare
@@ -52,6 +52,7 @@ func TestDagDaemon(t *testing.T) { | |||
|
|||
// CIDs should be equal | |||
|
|||
types.AssertHaveSameCid(assert, &expected, &actual) | |||
// TODO: reenable once cbor versions are matching! | |||
// types.AssertHaveSameCid(assert, &expected, &actual) |
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.
@whyrusleeping we have to disable this, as this is the issue with the missmatching cbor libraries, producing different CIDs AFAIU
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.
LGTM. This is a lot of work!
My only concern is that we're losing a little coverage in the command tests. If we get an unexpected error executing the request, we no longer get the error from the cmds call, and the tests aren't currently checking for it in the output. I suspect every test expecting success is looking for something else in the output that would be missing on error, so this is (probably) ok.
Agree, but this will get better in the work I am doing with the API, where the core logic is extracted and can be properly unit tested, without relying on the intricacies of the cmds library |
I'm sorry. But it had to be done..
On the bright side, no more direct dependencies on go-ipfs. And our deps tree is much cleaner!