Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: (BREAKING CHANGE) new record definition #8

Merged

Conversation

vasco-santos
Copy link
Member

PR for having the libp2p-record protobuf definition compliant with go-libp2p-record.

At first, go-libp2p-record was compliant with this. However, in the meantime it was changed in the following commits:

All in all, author and signature were removed, as well as all the logic inherent to the signature.

Note: this is a breaking change

@ghost ghost assigned vasco-santos Oct 3, 2018
@ghost ghost added the status/in-progress In progress label Oct 3, 2018
@vasco-santos
Copy link
Member Author

cc @jacobheun @diasdavid

(Don't know why, but I do not have permissions for requesting review in here)

@jacobheun
Copy link
Contributor

The right teams probably weren't added to the repo. @libp2p/dx can you make sure the right teams are added to this repo?

@victorb
Copy link
Member

victorb commented Oct 3, 2018

Team @libp2p/javascript-team has been added with write perrmission. Hope that helps!

// converted to bytes for JavaScript
optional bytes author = 3;

// optional bytes author = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there are reason for keeping these lines in here? People can always use git history to look up the changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, I personally left them as a reason for keeping timeReceived with identifier 5.

optional string timeReceived = 5

In go side, they removed it first, but then reverted to comment it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Bah, okay, fair enough.

@jacobheun
Copy link
Contributor

Since this is a breaking change, do we know what the impact of this is on js-ipfs since it's the primary package level consumer downstream?

@vasco-santos
Copy link
Member Author

vasco-santos commented Oct 3, 2018

We will need to go through every single module using this module and:

  • change the constructor to the new one
  • remove all the logic using the record signatures

I think that in this case, it is better to create the breaking change instead of maintaining all the current logic and just change the logic here, as we would have unexpected behaviors from what consumers expect.

Here is the list of the modules using this:

https://www.npmjs.com/package/libp2p-record

Two of those modules are already deprecated, so we will only have to modify 3 of them

@jacobheun
Copy link
Contributor

Yeah, I agree, and this looks good.

@vmx
Copy link

vmx commented Oct 18, 2018

The commit message format doesn't really conform to the JS Guidelines. The "breaking change" information should not be in the header (though it could be I guess), but there should be a section in the body.

The section from the body will then also show up in the changelog, which I think is important. The commit message should contain all the information on what this breaking change is about and how you need to change your code. A good start is already the original pull request message.

@vasco-santos
Copy link
Member Author

Thanks @vmx

I will add to the commit message body the breaking change information, when merging it.

BREAKING CHANGE: having the libp2p-record protobuf definition compliant with go-libp2p-record. Author and signature were removed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants