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

fix dependency issues, for now #695

Merged
merged 0 commits into from
Aug 1, 2018
Merged

fix dependency issues, for now #695

merged 0 commits into from
Aug 1, 2018

Conversation

whyrusleeping
Copy link
Member

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!

@whyrusleeping
Copy link
Member Author

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

Choose a reason for hiding this comment

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

missing return

@@ -4,9 +4,9 @@ import (
"encoding/json"
"math/big"

cbor "gx/ipfs/QmRiRJhn427YVuufBEHofLreKWNw7P7BWNq86Sb9kzqdbd/go-ipld-cbor"
"github.com/syndtr/goleveldb/leveldb/errors"
Copy link
Contributor

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?

Copy link
Member Author

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...

Copy link
Member Author

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

@whyrusleeping whyrusleeping force-pushed the deps/fix-it-all branch 2 times, most recently from d98d6ba to 57b2c54 Compare August 1, 2018 05:58
@whyrusleeping
Copy link
Member Author

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....

@@ -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)
Copy link
Contributor

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

Copy link
Contributor

@acruikshank acruikshank left a 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.

@dignifiedquire
Copy link
Contributor

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.

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

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