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 API breakage on Header.Unmarshal #228

Merged
merged 3 commits into from
Jul 16, 2023
Merged

Fix API breakage on Header.Unmarshal #228

merged 3 commits into from
Jul 16, 2023

Conversation

Sean-Der
Copy link
Member

Return (int, error) and not just error

Return (int, error) and not just error
@Sean-Der Sean-Der requested review from stv0g and aler9 July 16, 2023 18:45
@Sean-Der
Copy link
Member Author

@stv0g @aler9 This was the plan I believe? After this lands I can start tagging v1 off of master branch again.

@codecov
Copy link

codecov bot commented Jul 16, 2023

Codecov Report

Patch coverage: 83.33% and project coverage change: -0.04 ⚠️

Comparison is base (5d59489) 87.53% compared to head (9478ee9) 87.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   87.53%   87.50%   -0.04%     
==========================================
  Files          20       20              
  Lines        1877     1880       +3     
==========================================
+ Hits         1643     1645       +2     
- Misses        204      205       +1     
  Partials       30       30              
Flag Coverage Δ
go 87.50% <83.33%> (-0.04%) ⬇️
wasm 86.54% <83.33%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packet.go 88.21% <83.33%> (-0.19%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aler9
Copy link
Member

aler9 commented Jul 16, 2023

@Sean-Der the change that you want to restore was part of the backward-incompatible PR #119, that was included in v1.7.0 and that i intentionally left out in my previous PR. Prior to v1.7.0, signature of Header.Unmarshal was

rtp/packet.go

Line 81 in 4997f55

func (h *Header) Unmarshal(rawPacket []byte) error { //nolint:gocognit

after v1.7.0, signature is

rtp/packet.go

Line 78 in ccb8b11

func (h *Header) Unmarshal(buf []byte) (n int, err error) { //nolint:gocognit

Therefore, this PR restores compatibility with v1.7.x but breaks compatibility with v1.6.5. Probably it's better to merge it since version v1.7.x has surely more users than v1.6.x.

@Sean-Der
Copy link
Member Author

@aler9 thanks for the explanation. What a mess :(

I will get some tooling setup to make sure this doesn’t happen again.

@Sean-Der Sean-Der merged commit a2b2381 into master Jul 16, 2023
@Sean-Der Sean-Der deleted the revert-api-break branch July 16, 2023 21:35
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.

2 participants