From 06041c93ef8ec5c5e02f6203ed714ef2e11c2fb2 Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Thu, 20 Oct 2022 16:39:41 -0400 Subject: [PATCH] gopls/doc: update manual documentation of the newDiff setting Because we normally suppress internal options, the documentation for this setting is managed manually, and was stale. Update it, and bring it in-line with the actual setting docstring. Change-Id: Id3ceaa7303df4ee2a6bf07c54d087451169962cf Reviewed-on: https://go-review.googlesource.com/c/tools/+/444539 Run-TryBot: Robert Findley TryBot-Result: Gopher Robot gopls-CI: kokoro Reviewed-by: Peter Weinberger --- gopls/doc/settings.md | 13 +++++++------ gopls/internal/lsp/source/options.go | 9 ++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md index 34fb8d01ce..5595976363 100644 --- a/gopls/doc/settings.md +++ b/gopls/doc/settings.md @@ -510,13 +510,14 @@ Default: `false`. #### **newDiff** *string* -newDiff enables the new diff implementation. If this is "both", -for now both diffs will be run and statistics will be generateted in -a file in $TMPDIR. This is a risky setting; help in trying it -is appreciated. If it is "old" the old implementation is used, -and if it is "new", just the new implementation is used. +newDiff enables the new diff implementation. If this is "both", for now both +diffs will be run and statistics will be generated in a file in $TMPDIR. This +is a risky setting; help in trying it is appreciated. If it is "old" the old +implementation is used, and if it is "new", just the new implementation is +used. This setting will eventually be deleted, once gopls has fully migrated to +the new diff algorithm. -Default: 'old'. +Default: 'both'. ## Code Lenses diff --git a/gopls/internal/lsp/source/options.go b/gopls/internal/lsp/source/options.go index 136ba23d86..89442a32bd 100644 --- a/gopls/internal/lsp/source/options.go +++ b/gopls/internal/lsp/source/options.go @@ -613,11 +613,10 @@ type InternalOptions struct { // This option applies only during initialization. ShowBugReports bool - // NewDiff controls the choice of the new diff implementation. - // It can be 'new', 'checked', or 'old' which is the default. - // 'checked' computes diffs with both algorithms, checks - // that the new algorithm has worked, and write some summary - // statistics to a file in os.TmpDir() + // NewDiff controls the choice of the new diff implementation. It can be + // 'new', 'old', or 'both', which is the default. 'both' computes diffs with + // both algorithms, checks that the new algorithm has worked, and write some + // summary statistics to a file in os.TmpDir(). NewDiff string // ChattyDiagnostics controls whether to report file diagnostics for each