go/internal/lsp/diff
Peter Weinberger 3d474c8905 internal/lsp/diff: new diff implementation to replace go-diff
The new implementation is based on Myers' paper, and is in the
package diff/lcs.

There is a new option newDiff, that can be set to 'old', 'new',
or 'both'. The default is 'both', although that may not be
the right choice for a release. See gopls/hooks/diff.go.
'both' runs both the old and new diff algorithm and saves some
statistics in a file in os.Tempdir(),

When (or if) the new code becomes the default, this logging (and
some internal checking) will be removed.

The new implementation has internal checking, which currently
panics. The code in gopls/hooks/diff.go tries to save an encrypted
(for privacy) version of the failing input.

The package diff/myers has not been replaced, but it could be.

Fixes golang/go#52966

Change-Id: Id38d76ed383c4330d9373580561765b5a2412587
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396855
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Run-TryBot: Peter Weinberger <pjw@google.com>
2022-07-24 16:55:18 +00:00
..
difftest internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
lcs internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
myers internal/lsp, gopls: recover from go-diff panics 2020-12-17 16:56:54 +00:00
diff.go internal/span: eliminate TokenConverter 2022-06-01 19:19:15 +00:00
diff_test.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
ndiff.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
unified.go internal/lsp/diff: remove unused TokenConverter parameters 2022-06-01 15:41:18 +00:00