feat(generator/dart): handle encoding and decoding the 'bytes' data type#1630
Merged
devoncarew merged 4 commits intogoogleapis:mainfrom Mar 31, 2025
Merged
feat(generator/dart): handle encoding and decoding the 'bytes' data type#1630devoncarew merged 4 commits intogoogleapis:mainfrom
devoncarew merged 4 commits intogoogleapis:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1630 +/- ##
==========================================
- Coverage 95.72% 92.70% -3.02%
==========================================
Files 43 48 +5
Lines 1825 2016 +191
==========================================
+ Hits 1747 1869 +122
- Misses 78 147 +69 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I'm likely going to switch this to just encoding and decoding directly from |
coryan
reviewed
Mar 29, 2025
Comment on lines
+577
to
+578
| } else if isBytes { | ||
| return "encodeBytes(" + name + bang + ")" |
Collaborator
There was a problem hiding this comment.
This is more a comment about line 571... map<... , bytes> is legal proto, and they do appear in Google Cloud APIs:
I am not sure if we are handling this correctly, if not, fixing that is not urgent.
Contributor
Author
There was a problem hiding this comment.
I don't think we would handle it correctly; I'll open an issue to track it.
coryan
approved these changes
Mar 29, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
BYTES_TYPE(BytesValue?) in codegen #1563Opening this as a draft PR aince after implementing this I'm second guessing introducing a newBytesclass. We could just as easily always JSON encode / decode to the existing DartUint8Listtype.