Skip to content

Commit

Permalink
Migrate to GOPLS
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Staletic committed Jun 2, 2019
1 parent 2c9e145 commit 6aa040b
Show file tree
Hide file tree
Showing 26 changed files with 682 additions and 703 deletions.
11 changes: 3 additions & 8 deletions .gitmodules
Expand Up @@ -13,14 +13,6 @@
[submodule "third_party/requests"]
path = third_party/requests_deps/requests
url = https://github.com/requests/requests
[submodule "third_party/go/src/github.com/mdempsky/gocode"]
path = third_party/go/src/github.com/mdempsky/gocode
url = https://github.com/mdempsky/gocode
ignore = dirty
[submodule "third_party/go/src/github.com/rogpeppe/godef"]
path = third_party/go/src/github.com/rogpeppe/godef
url = https://github.com/rogpeppe/godef
ignore = dirty
[submodule "third_party/jedi"]
path = third_party/jedi_deps/jedi
url = https://github.com/davidhalter/jedi
Expand Down Expand Up @@ -48,3 +40,6 @@
[submodule "third_party/idna"]
path = third_party/requests_deps/idna
url = https://github.com/kjd/idna
[submodule "third_party/go/src/golang.org/x/tools"]
path = third_party/go/src/golang.org/x/tools
url = https://go.googlesource.com/tools
13 changes: 3 additions & 10 deletions build.py
Expand Up @@ -682,18 +682,11 @@ def EnableGoCompleter( args ):
go = FindExecutableOrDie( 'go', 'go is required to build gocode.' )

go_dir = p.join( DIR_OF_THIS_SCRIPT, 'third_party', 'go' )
os.chdir( p.join( go_dir, 'src', 'github.com', 'mdempsky', 'gocode' ) )
new_env = os.environ.copy()
new_env[ 'GOPATH' ] = go_dir
os.chdir( p.join(
go_dir, 'src', 'golang.org', 'x', 'tools', 'cmd', 'gopls' ) )
CheckCall( [ go, 'build' ],
env = new_env,
quiet = args.quiet,
status_message = 'Building gocode for go completion' )
os.chdir( p.join( go_dir, 'src', 'github.com', 'rogpeppe', 'godef' ) )
CheckCall( [ go, 'build' ],
env = new_env,
quiet = args.quiet,
status_message = 'Building godef for go definition' )
status_message = 'Building gopls for go completion' )


def WriteToolchainVersion( version ):
Expand Down
8 changes: 2 additions & 6 deletions run_tests.py
Expand Up @@ -72,7 +72,8 @@ def RunFlake8():
# - no aliases.
SIMPLE_COMPLETERS = [
'clangd',
'rust'
'rust',
'go',
]

# More complex or legacy cases can specify all of:
Expand All @@ -95,11 +96,6 @@ def RunFlake8():
'test': [ '--exclude-dir=ycmd/tests/tern' ],
'aliases': [ 'js', 'tern' ]
},
'go': {
'build': [ '--go-completer' ],
'test': [ '--exclude-dir=ycmd/tests/go' ],
'aliases': [ 'gocode' ]
},
'typescript': {
'build': [ '--ts-completer' ],
'test': [ '--exclude-dir=ycmd/tests/javascript',
Expand Down
1 change: 0 additions & 1 deletion third_party/go/src/github.com/mdempsky/gocode
Submodule gocode deleted from 00e7f5
1 change: 0 additions & 1 deletion third_party/go/src/github.com/rogpeppe/godef
Submodule godef deleted from b692db
1 change: 1 addition & 0 deletions third_party/go/src/golang.org/x/tools
Submodule tools added at cf8416

0 comments on commit 6aa040b

Please sign in to comment.