Граф коммитов

65 Коммитов

Автор SHA1 Сообщение Дата
Hana (Hyang-Ah) Kim bd87b3a981 extension/tools/release: uncomment vsce package and fix README handling
This CL also adds a trivial test that checks -n output to see
if the release command calls expected commands.

And fix nightly release's README handling again.
I hoped the new --readme-path flag can help us package README.md file
in the repo root https://go-review.git.corp.google.com/c/vscode-go/+/556535
but it doesn't seem to work yet.
Instead, we copy the README.md file to the extension directory.
Also, fixes the image and content base uris.

Update golang/vscode-go#3122

Change-Id: I6c79d34653346ef2e2b596f0ca4db1de16b79853
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556536
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2024-01-18 22:12:30 +00:00
Hana (Hyang-Ah) Kim 15be937e0f build: fix nightly release to include README
README.md is outside the extension directory.
Updated @vscode/vsce to get --readme-path flag support.
(Still in a prerelease state.
See https://github.com/microsoft/vscode-vsce/issues/905).

Change-Id: Ie9ed25643307ae8827bbf15589be131019a9159b
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556535
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2024-01-18 13:19:48 +00:00
Hana (Hyang-Ah) Kim dbc9084f8a build/release-nightly.yaml: delete invalid format comment
And fix all.bash prepare_nightly. It needs to access files in
build/nightly.

Change-Id: I9fab26159ebccc106b6be510088415aaa803ea19
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/555617
TryBot-Result: kokoro <noreply+kokoro@google.com>
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2024-01-12 21:47:20 +00:00
Hana (Hyang-Ah) Kim 690cf2e3ff extension: move extension code to a separate module
The vscgo command line tool is moved to the repo root module.
This simplifies the release process.

The extension module is meant to be used only for development
and majority of the code is non-Go code.

src/goInstallTools.ts installVSCGO is modified too -
Nightly installs with @master.

Updates golang/vscode-go#3122
Updates golang/vscode-go#3121

Change-Id: I04e441ecac71b4ab42e635835d91dcf344353e67
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/554316
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
2024-01-11 19:42:29 +00:00
Hana (Hyang-Ah) Kim 481f2b5d3f build: add GCB release workflow
This workflow is meant to replace the GitHub action workflow defined in
https://github.com/golang/vscode-go/blob/master/.github/workflows/release.yml

The GH workflow was a collection of command line tools invocation and
some bash scripting to parse the version tag and adjust the workflow
depending on whether it's for rc or not. I figured it's easier to work
with go, so ported the logic to build/release.go.

TODO: convert most part of build/all.bash and the nightly release workflow
with go code.

release.go uses `gh` (GitHub CLI tool) to post the release note and
the artifacts (vsix) to GitHub. Dockerfile is updated to include `gh`.
Reference: https://stackoverflow.com/a/69477930

The workflow needs to access GitHub personal access token.
To access the release API, write permission for Content & Workflow is
necessary.
https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens?apiVersion=2022-11-28#repository-permissions-for-contents

Tested it by triggering the GCB workflow against a forked repo.

For b/216321767

Change-Id: I1eec6b4b896fe1f1565bbf9e160f0368cade36c7
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/553115
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2024-01-04 23:03:48 +00:00
Hana (Hyang-Ah) Kim 445a800cf8 build: finish migration of nightly release to gcb
Delete the github workflow.
The new gcb workflow is tested. Go Nightly v2023.12.2718 was
released from GCB.

Change-Id: Ief89f3f914832c300981fe666e5d1ef82ff41558
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/553015
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2023-12-28 13:41:53 +00:00
Hana (Hyang-Ah) Kim db2b4c5297 build: run tests and build golang.go-nightly
Building and testing the extension requires a custom docker
image that includes Go, Node.js, jq, gopls, dlv, staticcheck, etc.

build-ci-image.yaml is a workflow that builds and stores the image
in Artifact Registry. (vscode-go-docker-repo/ci-image).

release-nightly.yaml workflow uses the container.

- The workflow clones the vscode-go repo (master branch).
- Before packaging, the "prepare nightly release" step
  adjusts the package.json for golang.go-nightly use.
- Then run tests. It's possible that the lint test and the
  tools/generate.go test may be unhappy about the spacing and formatting
  caused by the modification made during the previous step. However,
  the errors are not critical for packaging/publishing. Refactoring of
  all.bash was to skip the lint, generate.go tests during nightly
  release.

The workflow uploads the built extension to the project's GCS bucket but
does not publish the built extension to the marketplace yet.

Change-Id: Ib48fdc45f1fd1c86fcfc2d293e7f60690b2cad11
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/510515
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com>
2023-12-27 18:21:54 +00:00
Hana (Hyang-Ah) Kim 5f5a87520c build/Dockerfile: skip global typescript, vsce installation
We already have vsce and typescript in the project's package.json
and don't need to preinstall them.

Change-Id: Idf4484a3b5662d9509c3146737d6d448bd9c8771
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/506656
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2023-06-28 16:45:19 +00:00
Hana (Hyang-Ah) Kim 0de0e1131c build: remove unused, outdated cloudbuild config
The config predates kokoro CI.
The GitHub-based test workflow is not accessible
by external, unapproved contributors.

Remove the docs/testing.md that mostly talks about
these outdated workflows.

Change-Id: Ie7502067d53494f9b28bc807313b35885e066cb3
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/506655
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2023-06-28 16:45:08 +00:00
Hana (Hyang-Ah) Kim 92642366ae build: update docker to fix kokoro builder
The container enabled ipv6 but the VM we are in
doesn't have ipv6 interface yet. Set
NODE_OPTIONS="-dns-result-order=ipv4first" to prefer ipv4.

And update Dockerfile to install @vscode/vsce instead of
now obsolete vsce.

Lastly, skip printing gopls version.
We control gopls version to install/use in the install script.
And the setting doc test also prints gopls version.

Fixes golang/vscode-go#2769

Change-Id: Ie3f8ad52ebaefb52079a879f8892210967e74fc9
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/494402
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Bypass: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2023-05-12 17:30:18 +00:00
Hana (Hyang-Ah) Kim 8937a53db4 build/release-nightly: initial commit for release wf in GCB
The artifact .vsix is stored in the PROJECT_ID folder.
  gcloud builds submit \
     --config build/release-nightly.yaml

Change-Id: I20d16ca768cf3113986a1d9386bd96327d3645b7
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/461976
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2023-01-13 21:24:19 +00:00
Hana (Hyang-Ah) Kim 1cd7544fd0 build/all.bash: rearrange test order
VSCode modifies package.json while running in the
integration test. It reverts back the package.json
to original, but the revert file write can occur
asynchronously. That affects our document generator
tests following the integration test.

Change the test order so we run the document generator
test before.

Usually, integration test takes long. So, running
this quick documentation consistency test first and
reporting the problem early is better.

Also, change Dockerfile to bring up the container
as non-root user (node created by the node container)

Fixes golang/vscode-go#2230

Change-Id: I14b2d260f66e8213bdca2125900b5213a45ba8d1
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/405905
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2022-05-23 18:42:24 +00:00
Jamal Carvalho 7c79ef41d3 vscode-go: unify tsconfig for build and test
Now that all strict type errors are fixed, we can unify
the tsconfig.

Fixes golang/vscode-go#57.

Change-Id: If60e91c29826be6dafe9d614f0f0186cc8349b3f
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/406304
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2022-05-18 15:02:42 +00:00
Hana 29bdea3492 build/all.bash: disable packages.json setting test
Updates golang/vscode-go#2230

Change-Id: If5536535ea75a0ee396405943614863afed83790
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/404674
TryBot-Result: kokoro <noreply+kokoro@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2022-05-06 21:20:47 +00:00
Jamal Carvalho 8abfcaafda vscode-go: add strict typecheck step to CI
Test files are excluded from strict typechecking. We plan
to fix errors in those files as needed or remove the tests
with the legacy tooling.

For golang/vscode-go#57.

Change-Id: I84ea8bc1834e2e1ee58c297fed984bb94ec0de52
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/403775
TryBot-Result: kokoro <noreply+kokoro@google.com>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Auto-Submit: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-05-03 16:25:01 +00:00
Hana 097d627d78 build/all.bash: add go test in ci test
Change-Id: Icc70420f489f67242fb4a85d7c02a64d5cb9b70d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/401254
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-04-20 18:01:11 +00:00
Hyang-Ah Hana Kim cc7344bd0d Revert "build: run npm audit as part of ci test"
This reverts commit 106d188c81.

Reason for revert: from internal feedback - often the vulnerabilities are either false-positive or not impacting us, so blocking all dev work may not be a great idea.

Change-Id: Ia93867485c83583e69f4371cde4e9f08f9f883f2
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/397414
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-03-31 21:50:16 +00:00
Hana 106d188c81 build: run npm audit as part of ci test
Change-Id: I36c2b309464d22e2b8c27c956f21b62d4f484655
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/397114
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-03-31 14:22:32 +00:00
Hana e04eb10e61 build: log shm size & increase shm size to 8G
According to https://github.com/microsoft/vscode/issues/139984#issuecomment-1029043996
increasing /dev/shm from 64K helps preventing such crashes.

For golang/vscode-go#2054

Change-Id: Ib8669ba51efa01b5a92dc8e52f5c6026393b0405
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/384517
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2022-02-09 23:36:35 +00:00
Hana 5bfc2aad0d build/all.bash: fix jq query to change hideSystemGoroutines default
Change-Id: Idece26a875e914e0ee2de9758c8438eb273cd24e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380174
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Trust: Suzy Mueller <suzmue@golang.org>
2022-01-21 19:05:09 +00:00
Jamal Carvalho 5a7c4f7c60 build,docs: remove references to all.bash setup_env
Updated docs to reference go run tools/installtools/main.go.

Change-Id: I22d6f6aebe8096f6ed416886f017cb8a9b2f2d2b
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/379255
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2022-01-19 16:02:24 +00:00
Suzy Mueller 44e2d4d521 package.json: add config to hide system goroutines in debug
This change includes the configuration for hiding the system
goroutines in a debug session. It also sets the default value in
go nightly to true.

The setting of go.useLanguage server in nightly to true is also
removed by this change, since it is not the default everywhere.

Change-Id: I43b45b7743e6b3b31a41da1462e50669846b0f0d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/359402
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2021-10-28 20:40:05 +00:00
Hana 681be58c03 tools/installtools: add a helper to install Go tools for testing
GitHub Action workflows had tool installation commands defined
in .yml file while Kokoro CI used a bash script. This change
made them to share the same logic.

Instead of using the existing build/all.bash script, this CL
reimplemented the installation logic in go

- to have one single program for all platforms (linux, windows, mac)
- to implement complex logic that switches between go get and
go install depending on the go version (versioned binary installation
using go install became available only after 1.16.

Updates golang/vscode-go#1825

Change-Id: I295856e7d2bdd2d1fc07efc1e794eccb42b55ad6
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/359397
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2021-10-28 20:32:36 +00:00
Hana 930647af37 Revert "build: build dlv-dap@89ed5a0b"
This reverts commit 80c100954a.

Delve build is fixed, so, revert the temporary workaround.
We will figure out what workflows work better with the pinned
version of delve.

Change-Id: I2483953197c59892d07aabe137e7ca3a3c322e41
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/339778
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-08-04 22:15:57 +00:00
Hana 80c100954a build: build dlv-dap@89ed5a0b
Delve @ master currently doesn't build. Pin the version used in the
builders temporarily.

Change-Id: Ia4d393ddac5500dfec89540c40071381de3a65e2
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/339629
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2021-08-03 21:25:49 +00:00
Hana 505ad8ded0 build/all.bash: use go install for tool installation
In kokoro, we use only 1.16 which has `go install` support.
vscode-go repo has go.mod, so we can't use `go get` for clean install.
Alternatively we can try to use a temp directory (without go.mod)
as a working directory for tools installation. That's how we do
in github action where we also have testings running with go 1.15.

Change-Id: I44626b2889be61fe49ad59ba3f2eb9dbf98949b0
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/322990
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2021-05-27 17:50:03 +00:00
Hana 51baf3c3a6 build,.github/workflows: install dlv-dap
Preparation for https://go-review.googlesource.com/c/vscode-go/+/297189/

Updates golang/vscode-go#794

Change-Id: I4f83911f6e5304f6bb2e470f79caa7578e40742d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/297190
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2021-03-25 21:10:18 +00:00
Hana ace0cf715e tools: run gopls setting update in tools/generate.go
Made `tools/goplssetting` to be a library package
so the functionality can be called from tools/generate.go.
Since this is in a separate package, calling this is tricky
without being in the same module. Create go.mod.

I initially wanted to have go.mod under tools directory
but that breaks `go run tools/generate.go` from
the project root directory.

Simplified the jq query - the original one was written
when we attempted to define all gopls settings in the
top-level. We changed to define them inside "gopls"
object, it can be simpler. Also, it seems like jq
in the distro is outdated and doesn't support the 'walk'
function.

Removed 'unusedwrite' from the available analysis
list in the settings.md doc. It's not available in 0.6.6,
but added by mistake. Now this is included in CI and
CI currently uses the 'latest' for generation, this
extra setting not available in the current latest
will cause failure.

Fixes golang/vscode-go#1280

Change-Id: Ia1b153d079dfec932b8ddbe946e7352dc405a473
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/299949
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-03-10 16:55:07 +00:00
Hana fd0328225d src/goLint: switch the default lint tool to staticcheck
Golint is unmaintained and effectively deprecated.
So, switch to staticcheck, which is one of the existing linter
options we've provided, and is actively maintained.

Compared to golint, we observed staticcheck provides more useful
signals about the code style and common errors, while it is still
easy to use.  Some controversial checks existed in the golint are
turned off by default (ST1000, ST1003, ST1016), or removed. Users
can turn them on if want, by supplying -checks as lintFlags.
Unlike golint, staticcheck reports only compile errors and does
not show other lint errors if compile errors are present. Because
the compile errors will be also detected by the language server
or by the buildOnSave/vetOnSave checks and the extension will
deduplicate them, it may look to users as if the linter wasn't
running - I am not sure how much this will bother users yet.

Fixes golang/vscode-go#189
Updates #38968

Change-Id: Ie9334867aef3673aed01d7eaf757966486178dbc
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279212
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-03-09 06:26:28 +00:00
Suzy Mueller 7f1e23987a build/all.bash: use delve at master for ci
We want to test the latest dlv dap version in our CI to get any bug
fixes and updates while it is under active development.

Change-Id: I0680cfeb5bce481fe6eb5bd82a9239380c66d5ac
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/295417
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2021-02-24 15:56:14 +00:00
Hana 8c699ae3bb build: run with a different version of go
Change-Id: I0cc5a9cb6b6b834885a54ad4c99e0cdefc476473
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/292705
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-02-17 18:05:35 +00:00
Hana 02b5116be4 build/all.bash: install gocode-gomode
github.com/stamblerre/gocode, gocode for module mode.
Module mode will be the default in go1.16, and some tests
for legacy language feature providers need this.

For golang/vscode-go#983

Change-Id: I30ebdc33a6aa97faead69c8d5dfa6cc8c97aeec0
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/291309
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-02-12 00:15:08 +00:00
Hana ad3a7d2bf3 build: run docker with SYS_PTRACE capability
Debug tests need to launch dlv and that needs ptrace.
SYS_PTRACE is not in the default capability list so, add it.
https://docs.docker.com/engine/reference/run/

Change-Id: I3c53e0dd956b731726c5bbf7853d3f30d258dd26
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287712
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
2021-01-28 22:59:34 +00:00
Hana 83197d8596 build: install typescript in Dockerfile and adjust .vscodeignore
Not sure what caused the breakage now but since the error message
complains about missing tsc, here we install typescript explicitly.

https://source.cloud.google.com/results/invocations/fc221c68-5ed5-4e30-968e-66736d024092/targets/golang%2Fvscode-go%2Fgcp_ubuntu%2Fpresubmit/log

Explicitly exclude .user-data-dir-test directory from vsce packaging.
Tests leave the directory (used as a fake user workspace) behind
and sometimes fail to clean up files under the directory. Those
files cause issues in vsce packaging.

Change-Id: I34f552d90d459a957f88c324c92187fc5b8bab10
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279693
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2020-12-22 22:26:44 +00:00
Hana 6e8bbba6d0 build: run vsce package during testing
This will detect npm dependency issues that are detected during
packaging.

Change-Id: I7e3bbeee407b764a18e80a21999385472812cf08
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279012
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2020-12-17 23:10:42 +00:00
Hana d533d37003 build/all.bash: adjust home directory used in gerrit CI
Recent changes in kokoro seem to restrict access to the root directories
other than /workspace. Place all directories we need write permission fo
under /workspace directory. That includes the home directory (where npm
and the vscode test framework store downloaded data and configuration by
default) and the default GOPATH directory ($HOME/go) under which tests
copy test fixtures.

Fixes golang/vscode-go#833

Change-Id: I85ad64d253df31f782d29ae0fe994945210567cc
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/264877
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-10-26 18:17:23 +00:00
Hana (Hyang-Ah) Kim 70f7a71e6b src/goLanguageServer.ts: enable language server by default in nightly
Fixes golang/vscode-go#680

Change-Id: I93c47e48509175d302a3fe49e43642fd4bd7e749
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/257959
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-10-02 18:26:19 +00:00
Hana 39c9a2ea00 build/all.bash: install dependencies without -v
The builder log is too verbose with -v.

Change-Id: Id16a7d2d06dae3f13784110894c5f756a3420944
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/259139
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2020-10-02 15:56:08 +00:00
Hana (Hyang-Ah) Kim a5e0287e44 build/all.bash: build vscode-test-env from the root
build/Dockerfile assumes the docker container is built from the root,
after golang.org/cl/253749. Change `all.bash testlocal` to build
the container image from the root.

Change-Id: I30114c49894a847975cc901efd30bb029f0c79e7
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/254805
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-09-14 19:38:26 +00:00
Hana (Hyang-Ah) Kim d594eec748 build: add setup_env to all.bash and update contributing.md
That can be used to install all the tools vscode-go test depends
on. We use this new command in build/Dockerfile and also,
reference in the contribution guideline.

We can also consider changing .github/workflows/* to use this
command. But I am not yet sure how to reuse it in Windows yet.

Change-Id: I328707ab4c60428e67ef43f99d5d533a6fa5f211
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/253749
Reviewed-by: Suzy Mueller <suzmue@golang.org>
2020-09-10 21:12:18 +00:00
Hana (Hyang-Ah) Kim cd41bd1a67 .github/workflows, build: install dlv in containers
Tests now require dlv

Change-Id: I3e144cb08938c98f661b480772bd62bdc971ea24
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/251084
Reviewed-by: Robert Findley <rfindley@google.com>
2020-08-27 17:59:34 +00:00
Hana (Hyang-Ah) Kim 5089f49548 build,.github/workflows: use go1.15
Change-Id: Ibcc70d56d493db997fad28e26bf9df8d6e01a6f3
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/248077
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-08-13 18:19:22 +00:00
Rob Findley f4f147cc62 build: add line breaks to build/Dockerfile
Docker build is failing for me (and for CI). Probably this behavior
varies across Docker versions.

Change-Id: I953d40582eb4a2e17459d7655f90fdae8805cb59
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/248177
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-08-12 14:09:34 +00:00
Hana (Hyang-Ah) Kim 9bdb7685d6 build,.github/workflows: install all tools in modules mode
Tests do not need the source code of some tools.
Build all tools in modules mode as the extension does.

Also, remove explicit setting of GOPATH for testing.

Fixes golang/vscode-go#6

Change-Id: Ifff7262bd0debece5781ac73c091ba9d15acc440
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/244772
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-08-05 19:49:19 +00:00
Rebecca Stambler 45540aa143 tools, build: run settings generator in CI
CI should fail if you update the package.json without updating the
corresponding documentation. Confirmed that this works in an earlier,
intentionally broken patchset.

Updates golang/vscode-go#198.

Change-Id: I375e17ea7981bd045145128ac398ef1aa4c3f33d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/237877
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-06-18 17:59:01 +00:00
Hana (Hyang-Ah) Kim da0c52ab58 package.json: use golang.go in the main dev branch
Since we are now maintaining golang.go and that is our main extension,
using the id makes more sense. That will help existing Go users who want
to make and test a small change quickly.

- Rename src/telemetry.ts to src/const.ts because there is no
telemetry related code in the file.
- Move docs/nightly back to build/nightly, because they are meant to be
used during the nightly release process, rather than to serve as
documentation for end users.

In the nightly release, we replace the extension id with golang.go-nightly,
combine README.md with build/nightly/README.md, and replace src/const.ts
with build/nightly/const.ts.

Change-Id: I08e452dea4319d38f8f0e7ab1285ff34c2343365
GitHub-Last-Rev: 0a720d0c3e
GitHub-Pull-Request: golang/vscode-go#234
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/238358
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-06-18 09:52:46 +00:00
Hana (Hyang-Ah) Kim cdde55618b ci: add windows and mac test and run lint at the end in cloudbuild
Run lint as part of the usual build/test job instead of running it as a separate job.
But place it at the end so we can run tests even when fixing lint is necessary.

Separate ci.yml to test-smoke.yml (Smoke Tests) and test-long.yml (Long Tests).
Long Tests run on windows and mac as well, while Smoke Tests run only on linux.
(I removed mac and windows from Smoke Tests because our tests fail on windows currently).

Long Tests will be triggered on 'push', and
Smoke Tests will run on every 'pull_request'.

Updates #208

Change-Id: Ic978dacb2a2c51f2912375e739a6d854a091d4f4
GitHub-Last-Rev: ac5bafb083
GitHub-Pull-Request: golang/vscode-go#218
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/237717
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-06-17 21:31:14 +00:00
Rebecca Stambler 16ccd41731 vscode-go: a few small clean-up items
Delete the merge.bash file as we no longer need it.
Fix a Markdown lint warning in SECURITY.md.
Mention linting in the contribution doc.
Delete outdated CONTRIBUTING.md.

Change-Id: Ica9afdfb3a4f906df890c7dddf3740bdad8f44da
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/237257
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-06-10 18:54:57 +00:00
Hana (Hyang-Ah) Kim 85e647e938 all: update LICENSE and copyright headers of modified files
I updated copyright headers of the some of the files we heavily
modified to set the example.

Change-Id: If24d525442bd6ba37133f1397f81c8d918ad725e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236964
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-06-08 22:34:13 +00:00
Rebecca Stambler 4a34f9b98d docs: rewrite debugging.md, testing.md, smoke-test.md, etc.
Rewrote a number of documents. Notable changes:
- Cleaned up and updated the debugging documentation. Some more work
  still needs to be done, but I think it's in pretty good shape.
- Move build/README.md to docs/testing.md. I think it fits better with
  the other docs, and I expect most of the build directory will be going
  away soon? Hana, let me know what you think because I can also move it
  back.
- Separated settings.md from commands.md. Ran out of steam when trying
  to finish commands.md, but I'll try to work on it more next. Haven't
  updated all of the incorrect references to commands.md yet, but
  that's for the next CL.
- Updated and cleaned up the smoke test. Not sure if we'll ever use it,
  but it's not a bad thing to have, and I caught a gopls bug with it.

Change-Id: Ie9ed8187a0597d36f5960d77fd999d14366bbe74
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236379
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2020-06-07 16:05:03 +00:00