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 bug on Update JSON encoders #2805

Merged
merged 2 commits into from
Nov 30, 2022
Merged

Fix bug on Update JSON encoders #2805

merged 2 commits into from
Nov 30, 2022

Conversation

alejandrohdezma
Copy link
Member

❗ This must be released as a patch version ASAP.

πŸ› The bug

Update decoders are expecting JSON objects to be wrapped in a field named as the class:

"ForArtifactId": {
   ...
}

While individual encoders are not creating this field.

This only happens when decoding Grouped updates, since it is the only place an individual encoder was being used.

πŸ‘¨πŸΌβ€πŸ’» The solution

This PR ensures encoders always introduce this wrapper-field so updates are correctly parsed on every situation.

References

Fixes #2802

@alejandrohdezma alejandrohdezma requested a review from a team November 30, 2022 12:56
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Base: 80.59% // Head: 80.69% // Increases project coverage by +0.10% πŸŽ‰

Coverage data is based on head (3883d9a) compared to base (7de5efa).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2805      +/-   ##
==========================================
+ Coverage   80.59%   80.69%   +0.10%     
==========================================
  Files         149      149              
  Lines        2860     2865       +5     
  Branches      200      215      +15     
==========================================
+ Hits         2305     2312       +7     
+ Misses        555      553       -2     
Impacted Files Coverage Ξ”
...main/scala/org/scalasteward/core/data/Update.scala 97.05% <100.00%> (+3.40%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

β˜” View full report at Codecov.
πŸ“’ Do you have feedback about the report comment? Let us know in this issue.

@alejandrohdezma alejandrohdezma merged commit 0a6e3e0 into main Nov 30, 2022
@alejandrohdezma alejandrohdezma deleted the bug/encoder-decoder branch November 30, 2022 15:06
@alifirat
Copy link
Contributor

hey @alejandrohdezma do you plan to publish a patch version soon?

@alejandrohdezma
Copy link
Member Author

@exoego @fthomas can you think of any reason for not releasing a 0.16.1 version?

@alifirat
Copy link
Contributor

@alejandrohdezma didn't think about it but if there is a snapshot version available, I can give a try and share feedbacks about the patch.

@alejandrohdezma
Copy link
Member Author

Yeah! It should be 0.16.0-20-0a6e3e0d-SNAPSHOT

@fthomas
Copy link
Member

fthomas commented Nov 30, 2022

No objection to releasing 0.16.1 from me.

@alifirat
Copy link
Contributor

@alejandrohdezma after cleaning the workspace, it worked as expected.

@alejandrohdezma
Copy link
Member Author

Releasing 0.16.1 now :)

@alejandrohdezma
Copy link
Member Author

Version 0.16.1 has been released containing this change!

@exoego exoego added this to the v0.16.1 milestone Dec 2, 2022
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.

JSON parsing error when decoding pull_requests.json
4 participants