Skip to content

Commit c5607ec

Browse files
committed
docs: update contribution instruction
Updates #3122 Change-Id: I7e8958a8943ccfd104c08e7aca70bf2d805933fd Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556855 Commit-Queue: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent bd87b3a commit c5607ec

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

docs/contributing.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The debugging feature documentation has a dedicated section for tips for develop
5858

5959
```bash
6060
git clone https://go.googlesource.com/vscode-go
61-
cd vscode-go
61+
cd vscode-go/extension
6262
npm ci
6363
code .
6464
```
@@ -79,10 +79,8 @@ If you make subsequent edits in the codebase, you can reload (`Ctrl+R` or `⌘+R
7979
8080
## Test
8181
82-
**note**: Unfortunately, VS Code test framework inherits your user settings when running tests [Issue 43](https://github.com/golang/vscode-go/issues/43). Make sure VS Code user settings do not contain any go related configuration, except `go.gopath` or `go.toolsGopath` in case you installed the tools for testing in a different `GOPATH`.
83-
84-
8582
1. `export GOPATH=/path/to/gopath/for/test`
83+
2. `cd extension` -- most extension development work is done in the `extension` directory.
8684
2. `go run tools/installtools/main.go` -- this will install all tools in the `GOPATH/bin` built from master/main.
8785
3. There are currently two different types of tests in this repo:
8886
- `npm run unit-test`: this runs unit tests defined in `test/unit`. They are light-weight tests that don't require `vscode` APIs.
@@ -107,10 +105,7 @@ You can supply environment variables (e.g. `MOCHA_GREP`) by modifying the launch
107105

108106
When you want to filter tests while debugging, utilize the `MOCAH_GREP` environment variable discussed previously - i.e., set the environment variable in the `env` property of the launch configuration.
109107

110-
#### (3) Another way to run all tests:
111-
`build/all.bash test` is the script used by a CI (Linux).
112-
113-
#### (4) Using different versions of tools.
108+
#### (3) Using different versions of tools.
114109
The tests will pick tools found from `GOPATH/bin` first. So, install the versions you want there.
115110

116111
## Running/Debugging the Extension
@@ -156,10 +151,9 @@ Or, if you use vscode for gopls development, you can configure `launch.json` of
156151

157152
After making changes to the extension, you may want to test it end-to-end instead of running it in debug mode. To do this, you can sideload the extension.
158153

159-
1. Install the [vsce](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#vsce) tool for packaging extensions (`npm install -g vsce`).
160-
2. `cd` into your `vscode-go` directory.
154+
1. `cd` into the `extension` directory.
161155
3. Install all dependencies by running `npm ci`.
162-
4. Run `vsce package`. This will generate a file with a `.vsix` extension in your current directory.
156+
4. Run `npx vsce package`. This will generate a file with a `.vsix` extension in your current directory.
163157

164158
```bash
165159
npm install -g vsce
@@ -194,10 +188,7 @@ you or a fellow contributor assigns the `Run-TryBot=+1` label in Gerrit, the tes
194188
for running Dockerized tests. `Kokoro` will post the result as a comment, and add its `TryBot-Result`
195189
vote after each test run completes.
196190
197-
To force a re-run of the Kokoro CI,
198-
* Remove `TryBot-Result` vote (hover over the label, and click the trashcan icon).
199-
* Reply in Gerrit with the comment "kokoro rerun". Make sure to keep the `Run-TryBot` +1 vote.
200-
191+
To force a re-run of the Kokoro CI, add comment `kokoro rerun` to the CL.
201192
202193
[#vscode-dev]: https://gophers.slack.com/archives/CUWGEKH5Z
203194
[Gophers Slack]: https://invite.slack.golangbridge.org/

0 commit comments

Comments
 (0)