Skip to content

Commit 4752c04

Browse files
committed
internal/gopls: remove unnecessary old command alias
At some point in the past, gopls changed the name of its "remote" command from "inspect". We don't need to support the old alias. Signed-off-by: Matthew Sackman <[email protected]> Change-Id: I827ac724a7bf9ab24e5bc1aea570af2630a64030 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1218087 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 parent 8935ee3 commit 4752c04

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

internal/golangorgx/gopls/cmd/cmd.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ func (app *Application) internalCommands() []tool.Application {
266266
func (app *Application) featureCommands() []tool.Application {
267267
return []tool.Application{
268268
&format{app: app},
269-
newRemote(app, ""),
270-
newRemote(app, "inspect"),
269+
newRemote(app),
271270
}
272271
}
273272

internal/golangorgx/gopls/cmd/remote.go

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,23 @@ import (
2020
type remote struct {
2121
app *Application
2222
subcommands
23-
24-
// For backward compatibility, allow aliasing this command (it was previously
25-
// called 'inspect').
26-
//
27-
// TODO(rFindley): delete this after allowing some transition time in case
28-
// there were any users of 'inspect' (I suspect not).
29-
alias string
3023
}
3124

32-
func newRemote(app *Application, alias string) *remote {
25+
func newRemote(app *Application) *remote {
3326
return &remote{
3427
app: app,
3528
subcommands: subcommands{
3629
&listSessions{app: app},
3730
&startDebugging{app: app},
3831
},
39-
alias: alias,
4032
}
4133
}
4234

43-
func (r *remote) Name() string {
44-
if r.alias != "" {
45-
return r.alias
46-
}
47-
return "remote"
48-
}
49-
35+
func (r *remote) Name() string { return "remote" }
5036
func (r *remote) Parent() string { return r.app.Name() }
5137

5238
func (r *remote) ShortHelp() string {
53-
short := "interact with the cuelsp daemon"
54-
if r.alias != "" {
55-
short += " (deprecated: use 'remote')"
56-
}
57-
return short
39+
return "interact with the cuelsp daemon"
5840
}
5941

6042
// listSessions is an inspect subcommand to list current sessions.

0 commit comments

Comments
 (0)