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: return the shortest, completely resolved path in the resolve command #5704

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Oct 30, 2018

fixes #5703

This is a breaking change. We used to return an error if the path didn't end at a CID but, IMO, that's incorrect. We should allow resolution of paths that stop in the middle of an object.

@ghost ghost assigned Stebalien Oct 30, 2018
@ghost ghost added the status/in-progress In progress label Oct 30, 2018
@Stebalien Stebalien added the status/blocked Unable to be worked further until needs are met label Oct 30, 2018
@Stebalien
Copy link
Member Author

Stebalien commented Oct 30, 2018

Blocked on ipfs-inactive/interface-js-ipfs-core#385.

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.

Yeah, this is a rather breaking change but I don't know if there is a better way other than adding a check for rp.Remainder() == ""

core/coreapi/interface/path.go Outdated Show resolved Hide resolved
@Stebalien
Copy link
Member Author

Closing in favor of just restoring existing behavior (for now).

@Stebalien Stebalien removed the status/blocked Unable to be worked further until needs are met label Feb 19, 2019
Copy link
Contributor

@djdv djdv left a comment

Choose a reason for hiding this comment

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

The only nit I have is using the + operator over some path specific function (either go-path or path's Join())
However, I question the necessity for it here outside of being pedantic. Maybe we should be though.

@Stebalien Stebalien merged commit 0df4bb7 into master Feb 20, 2019
@ghost ghost removed the status/in-progress In progress label Feb 20, 2019
@Stebalien
Copy link
Member Author

@djdv let'd tackle that in a followup PR (the current code was already doing that).

@Stebalien Stebalien deleted the fix/5703 branch February 20, 2019 18:43
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.

ipfs resolve isn't behaving well
4 participants