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

BREAKING CHANGE: Allow for added.f and added6.f to be optional #108

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gdborton
Copy link

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[x] Bug fix
[ ] New feature
[ ] Other, please explain:

What changes did you make? (Give an overview)

Which issue (if any) does this pull request address?
#107

Is there anything you'd like reviewers to focus on?
Just compare against the spec I guess:
https://bittorrent.org/beps/bep_0011.html

index.js Outdated Show resolved Hide resolved
Co-authored-by: Cas_ <[email protected]>
index.js Outdated Show resolved Hide resolved
@gdborton gdborton requested a review from ThaUnknown January 28, 2025 16:57
@ThaUnknown ThaUnknown requested a review from SilentBot1 January 28, 2025 17:01
@ThaUnknown
Copy link
Member

ThaUnknown commented Jan 29, 2025

actually....

Messages must contain at least one of the following fields: added, added6, dropped, dropped6.

does this matter for us during decoding? I feel like this will break shit downstream because they expect flags, but there are none

@SilentBot1
Copy link
Member

SilentBot1 commented Jan 30, 2025

actually....

Messages must contain at least one of the following fields: added, added6, dropped, dropped6.

does this matter for us during decoding? I feel like this will break shit downstream because they expect flags, but there are none

During decoding, no, currently we decode and do nothing with messages that don't have any of added, added6, dropped, dropped6, which is fine, as the BEP leaves it up to the client how they want to handle it.

It could cause issues downstream if flags are expected to not be undefined, but the BEP states flags are optional, so imo we should treat them as such.

We should probably release this as a breaking change if we're worried about this breaking stuff downstream. I'll update the title for now, but we can change it back if we change our minds / disagree about this being a breaking change.

@SilentBot1 SilentBot1 changed the title Allow for added.f and added6.f to be optional BREAKING CHANGE: Allow for added.f and added6.f to be optional Jan 30, 2025
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