This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 177
Fix anno deserialization when class field is not first #2501
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update `findTypeHints` to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled. Fixes chipsalliance#2497.
seldridge
approved these changes
Mar 25, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
seldridge
added
the
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
label
Mar 25, 2022
mergify bot
pushed a commit
that referenced
this pull request
Mar 25, 2022
Update `findTypeHints` to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled. Fixes #2497. (cherry picked from commit a2d48a5) # Conflicts: # src/main/scala/firrtl/annotations/JsonProtocol.scala
mergify bot
pushed a commit
that referenced
this pull request
Mar 25, 2022
Update `findTypeHints` to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled. Fixes #2497. (cherry picked from commit a2d48a5)
mergify
bot
added
the
Backported
This PR has been backported to marked stable branch
label
Mar 25, 2022
mergify bot
added a commit
that referenced
this pull request
Mar 25, 2022
Update `findTypeHints` to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled. Fixes #2497. (cherry picked from commit a2d48a5) Co-authored-by: Fabian Schuiki <[email protected]>
seldridge
added a commit
that referenced
this pull request
Mar 25, 2022
mergify bot
added a commit
that referenced
this pull request
Mar 25, 2022
… (#2502) * Fix anno deserialization when class field is not first (#2501) Update `findTypeHints` to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled. Fixes #2497. (cherry picked from commit a2d48a5) # Conflicts: # src/main/scala/firrtl/annotations/JsonProtocol.scala * fixup! Fix anno deserialization when class field is not first (#2501) Co-authored-by: Fabian Schuiki <[email protected]> Co-authored-by: Schuyler Eldridge <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Backported
This PR has been backported to marked stable branch
Please Merge
Accepted PRs that are ready to be merged. Useful when waiting on CI.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update
findTypeHints
to allow for the "class" field in JSON objects to appear anywhere in the object. This used to rely on the field being the very first in the object, which is easily violated when reading JSON data generated externally, since an object's order of fields is unspecified and can be arbitrarily scrambled.Fixes #2497.
Contributor Checklist
Did you add Scaladoc to every public function/method?Did you update the FIRRTL spec to include every new feature/behavior?Type of Improvement
Bug fix
API Impact
None
Backend Code Generation Impact
None
Desired Merge Strategy
Squash
Release Notes
Allow for annotation deserialization class hints to appear anywhere in a JSON object, not just the first field.
Reviewer Checklist (only modified by reviewer)
Please Merge
?