go/internal/lsp/diff/lcs
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
..
common.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
common_test.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
doc.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
git.sh internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
labels.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
old.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00
old_test.go internal/lsp/diff: new diff implementation to replace go-diff 2022-07-24 16:55:18 +00:00