Support binary diffs#887
Merged
Merged
Conversation
eseliger
commented
Nov 24, 2022
| @@ -1,3 +1,3 @@ | |||
| golang 1.18.1 | |||
| golang 1.19.3 | |||
Member
Author
There was a problem hiding this comment.
Had to upgrade, Sourcegraph now requires it.
02a5f92 to
06253ca
Compare
06253ca to
485e759
Compare
eseliger
commented
Nov 24, 2022
eseliger
commented
Nov 24, 2022
LawnGnome
approved these changes
Nov 26, 2022
LawnGnome
left a comment
Contributor
There was a problem hiding this comment.
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) |
Contributor
There was a problem hiding this comment.
ffs also accurately reflects my response to the original Slack thread.
# Conflicts: # go.mod # go.sum
scjohns
pushed a commit
that referenced
this pull request
Apr 24, 2023
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.
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.
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.