-
Notifications
You must be signed in to change notification settings - Fork 70
Support binary diffs #887
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
Support binary diffs #887
Conversation
| @@ -1,3 +1,3 @@ | |||
| golang 1.18.1 | |||
| golang 1.19.3 | |||
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.
Had to upgrade, Sourcegraph now requires it.
02a5f92 to
06253ca
Compare
06253ca to
485e759
Compare
LawnGnome
left a comment
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.
I haven't tested this yet — I'll do that after I've reviewed the backend PR — but this LGTM. I'm sort of looking at the []byte() conversions that are getting removed here and there and kicking myself that we didn't do this (much) sooner.
| Client: opts.client, | ||
| }) | ||
|
|
||
| ffs, err := svc.DetermineFeatureFlags(ctx) |
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.
ffs also accurately reflects my response to the original Slack thread.
# Conflicts: # go.mod # go.sum
Patches can contain non UTF-8 characters (who knew). Since we JSON-encode the patch as a string field, we lose that encoding over the wire to Sourcegraph. This PR adds support for a byte slice encoded (so base64 over the wire) mode from Sourcegraph 4.4 onwards, which retains original encoding.
Patches can contain non UTF-8 characters (who knew). Since we JSON-encode the patch as a string field, we lose that encoding over the wire to Sourcegraph. This PR adds support for a byte slice encoded (so base64 over the wire) mode from Sourcegraph 4.4 onwards, which retains original encoding.
Test plan
Validated this src-cli version still works with older Sourcegraph backends (then without this fix), and with a current Sourcegraph backend where this fixes patches with non UTF-8. Tested with src-cli execution and SSBC.