Skip to content

Commit

Permalink
gopls/internal/protocol/command: move from ../lsp
Browse files Browse the repository at this point in the history
The lsp directory is no more.

Change-Id: I7badd01645c7faab841e6219387cb84d8b893f2b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/557741
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
  • Loading branch information
adonovan authored and gopherbot committed Jan 24, 2024
1 parent 6d109d1 commit 95c6ac4
Show file tree
Hide file tree
Showing 44 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion cmd/deadcode/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ With no flags, the command prints the name and location of each dead
function in the form of a typical compiler diagnostic, for example:
$ deadcode -f='{{range .Funcs}}{{println .Position}}{{end}}' -test ./gopls/...
gopls/internal/lsp/command.go:1206:6: unreachable func: openClientEditor
gopls/internal/protocol/command.go:1206:6: unreachable func: openClientEditor
gopls/internal/template/parse.go:414:18: unreachable func: Parsed.WriteNode
gopls/internal/template/parse.go:419:18: unreachable func: wrNode.writeNode
Expand Down
2 changes: 1 addition & 1 deletion gopls/doc/design/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ provided as a debugging aid (but see

[cache]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/cache
[cmd]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/cmd
[command]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/lsp/command
[command]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/protocol/command
[debug]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/lsp/debug
[file]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/file
[filecache]: https://pkg.go.dev/golang.org/x/tools/gopls@master/internal/filecache
Expand Down
4 changes: 2 additions & 2 deletions gopls/doc/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/gopls/internal/golang"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/lsp/command/commandmeta"
"golang.org/x/tools/gopls/internal/mod"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol/command/commandmeta"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/util/safetoken"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"sync/atomic"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/internal/memoize"
)

Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"golang.org/x/tools/go/packages"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/cache/metadata"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"golang.org/x/mod/modfile"
"golang.org/x/mod/module"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/tag"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/mod_tidy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"golang.org/x/mod/modfile"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/internal/diff"
"golang.org/x/tools/internal/event"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cache/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"golang.org/x/tools/gopls/internal/cache/methodsets"
"golang.org/x/tools/gopls/internal/cache/typerefs"
"golang.org/x/tools/gopls/internal/cache/xrefs"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/debug"
"golang.org/x/tools/gopls/internal/filecache"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/lsprpc"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/server"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/util/browser"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"os"
"strings"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/server"
"golang.org/x/tools/gopls/internal/util/slices"
"golang.org/x/tools/internal/tool"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"log"
"os"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/lsprpc"
"golang.org/x/tools/gopls/internal/protocol/command"
)

type remote struct {
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"time"

"golang.org/x/tools/gopls/internal/filecache"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/server"
"golang.org/x/tools/gopls/internal/settings"
bugpkg "golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/usage/vulncheck.hlp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Usage:
WARNING: this command is for internal-use only.

By default, the command outputs a JSON-encoded
golang.org/x/tools/gopls/internal/lsp/command.VulncheckResult
golang.org/x/tools/gopls/internal/protocol/command.VulncheckResult
message.
Example:
$ gopls vulncheck <packages>
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/cmd/vulncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (v *vulncheck) DetailedHelp(f *flag.FlagSet) {
WARNING: this command is for internal-use only.
By default, the command outputs a JSON-encoded
golang.org/x/tools/gopls/internal/lsp/command.VulncheckResult
golang.org/x/tools/gopls/internal/protocol/command.VulncheckResult
message.
Example:
$ gopls vulncheck <packages>
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/golang/code_lens.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
)

Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/golang/codeaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/cache/parsego"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/lsprpc/lsprpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"golang.org/x/tools/gopls/internal/debug"
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/server"
"golang.org/x/tools/gopls/internal/settings"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/mod/code_lens.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/golang"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
)

// LensFuncs returns the supported lensFuncs for go.mod files.
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/mod/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"golang.org/x/sync/errgroup"
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/vulncheck/govulncheck"
"golang.org/x/tools/internal/event"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
)

type Command struct {
Expand Down Expand Up @@ -52,7 +52,7 @@ func Load() (*packages.Package, []*Command, error) {
Mode: packages.NeedTypes | packages.NeedTypesInfo | packages.NeedSyntax | packages.NeedImports | packages.NeedDeps,
BuildFlags: []string{"-tags=generate"},
},
"golang.org/x/tools/gopls/internal/lsp/command",
"golang.org/x/tools/gopls/internal/protocol/command",
)
if err != nil {
return nil, nil, fmt.Errorf("packages.Load: %v", err)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"log"
"os"

"golang.org/x/tools/gopls/internal/lsp/command/gen"
"golang.org/x/tools/gopls/internal/protocol/command/gen"
)

func main() {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"golang.org/x/tools/gopls/internal/lsp/command/gen"
"golang.org/x/tools/gopls/internal/protocol/command/gen"
"golang.org/x/tools/internal/testenv"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gopls/internal/server/code_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/golang"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/mod"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/internal/event"
)

Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/server/code_lens.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/golang"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/mod"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/internal/event"
"golang.org/x/tools/internal/event/tag"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"golang.org/x/tools/gopls/internal/debug"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/golang"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/progress"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/settings"
"golang.org/x/tools/gopls/internal/telemetry"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/settings/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ import (
"golang.org/x/tools/gopls/internal/analysis/unusedvariable"
"golang.org/x/tools/gopls/internal/analysis/useany"
"golang.org/x/tools/gopls/internal/file"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
)

type Annotation string
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/telemetry/telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"golang.org/x/telemetry/counter"
"golang.org/x/telemetry/counter/countertest" // requires go1.21+
"golang.org/x/tools/gopls/internal/hooks"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/telemetry"
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/bench/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"golang.org/x/tools/gopls/internal/cmd"
"golang.org/x/tools/gopls/internal/hooks"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/test/integration/fake"
"golang.org/x/tools/gopls/internal/util/bug"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/bench/iwl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package bench
import (
"testing"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/test/integration/fake"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/codelens/codelens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/util/bug"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/internal/testenv"
)

Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/codelens/gcdetails_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/server"
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/test/integration/fake"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/debug/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"testing"

"golang.org/x/tools/gopls/internal/hooks"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/util/bug"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/fake/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"strings"
"sync"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/test/integration/fake/glob"
"golang.org/x/tools/gopls/internal/util/pathutil"
"golang.org/x/tools/gopls/internal/util/slices"
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/misc/debugserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"testing"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"

. "golang.org/x/tools/gopls/internal/test/integration"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/misc/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/test/compare"
. "golang.org/x/tools/gopls/internal/test/integration"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/misc/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"regexp"
"testing"

"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/server"
. "golang.org/x/tools/gopls/internal/test/integration"
)
Expand Down
2 changes: 1 addition & 1 deletion gopls/internal/test/integration/misc/vuln_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/google/go-cmp/cmp"

"golang.org/x/tools/gopls/internal/cache"
"golang.org/x/tools/gopls/internal/lsp/command"
"golang.org/x/tools/gopls/internal/protocol"
"golang.org/x/tools/gopls/internal/protocol/command"
"golang.org/x/tools/gopls/internal/test/compare"
. "golang.org/x/tools/gopls/internal/test/integration"
"golang.org/x/tools/gopls/internal/vulncheck"
Expand Down
Loading

0 comments on commit 95c6ac4

Please sign in to comment.