sync: merge microsoft/vscode-go@c8ed3d8 into master
Change-Id: Ib310648164ca538b79e54be4d74f70b44975364c
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..b600bec
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,93 @@
+name: build
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ name: ${{ matrix.os }} ${{ matrix.version }}
+ runs-on: ${{ matrix.os }}
+
+ if: "!contains(github.event.head_commit.message, 'SKIP CI')"
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest]
+ version: ['stable']
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v1
+
+ - name: Setup Node
+ uses: actions/setup-node@v1
+ with:
+ node-version: '10.x'
+
+ - name: Setup Go
+ uses: actions/setup-go@v1
+ with:
+ go-version: '1.14'
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Compile
+ run: npm run vscode:prepublish
+
+ - name: Install Go tools (Modules mode)
+ run: |
+ go version
+ go get github.com/acroca/go-symbols \
+ github.com/davidrjenni/reftools/cmd/fillstruct \
+ github.com/haya14busa/goplay/cmd/goplay \
+ github.com/mdempsky/gocode \
+ github.com/sqs/goreturns \
+ github.com/uudashr/gopkgs/v2/cmd/gopkgs \
+ github.com/zmb3/gogetdoc \
+ golang.org/x/lint/golint \
+ golang.org/x/tools/cmd/gorename
+ env:
+ GO111MODULE: on
+
+ - name: Install Go tools (GOPATH mode)
+ run: |
+ go version
+ go get github.com/cweill/gotests/... \
+ github.com/rogpeppe/godef \
+ github.com/ramya-rao-a/go-outline
+ # Because some tests depend on the source code checked in GOPATH. TODO: FIX THEM.
+ env:
+ GO111MODULE: off
+
+ - name: Run unit tests
+ run: npm run unit-test
+ continue-on-error: true
+
+ - name: Run tests
+ uses: GabrielBB/xvfb-action@v1.0
+ with:
+ run: npm run test
+ env:
+ CODE_VERSION: ${{ matrix.version }}
+ continue-on-error: ${{ matrix.version == 'insiders' }}
+
+ eslint:
+ runs-on: ubuntu-latest
+ if: "!contains(github.event.head_commit.message, 'SKIP CI')"
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v1
+
+ - name: Setup Node
+ uses: actions/setup-node@v1
+ with:
+ node-version: '10.x'
+
+ - name: Install Dependencies
+ run: 'npm install --frozen-lockfile'
+ shell: bash
+
+ - name: Lint check
+ run: npm run lint
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..eff44f1
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,84 @@
+name: release
+
+# Daily release on 15:00 UTC, monday-thursday.
+# Or, force to release by triggering repository_dispatch events by using
+# curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/golang/vscode-go/dispatches -d '{ "event_type": "force-release" }'
+on:
+ schedule:
+ - cron: "0 15 * * MON-THU" # 15 UTC, monday-thursday daily
+ repository_dispatch:
+ types: [force-release]
+
+env:
+ GOPATH: /tmp/go
+ # Because some tests require explicit setting of GOPATH. TODO: FIX THEM.
+
+jobs:
+ release:
+ name: Release Nightly
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v1
+
+ - name: Setup Node
+ uses: actions/setup-node@v1
+ with:
+ node-version: '10.x'
+
+ - name: Setup Go
+ uses: actions/setup-go@v1
+ with:
+ go-version: '1.14'
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Install Go tools (Modules mode)
+ run: |
+ go version
+ go get github.com/acroca/go-symbols \
+ github.com/davidrjenni/reftools/cmd/fillstruct \
+ github.com/haya14busa/goplay/cmd/goplay \
+ github.com/mdempsky/gocode \
+ github.com/sqs/goreturns \
+ github.com/uudashr/gopkgs/v2/cmd/gopkgs \
+ github.com/zmb3/gogetdoc \
+ golang.org/x/lint/golint \
+ golang.org/x/tools/cmd/gorename
+ env:
+ GO111MODULE: on
+
+ - name: Install Go tools (GOPATH mode)
+ run: |
+ go version
+ go get github.com/cweill/gotests/... \
+ github.com/rogpeppe/godef \
+ github.com/ramya-rao-a/go-outline
+ # Because some tests depend on the source code checked in GOPATH. TODO: FIX THEM.
+ env:
+ GO111MODULE: off
+
+ - name: Prepare Release
+ run: build/all.bash prepare_nightly
+
+ - name: Run unit tests
+ run: npm run unit-test
+ continue-on-error: true
+
+ - name: Run tests
+ uses: GabrielBB/xvfb-action@v1.0
+ with:
+ run: npm run test
+ env:
+ CODE_VERSION: 'insiders'
+
+ - name: Publish
+ if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go'
+ uses: lannonbr/vsce-action@704da577da0f27de5cdb4ae018374c2f08b5f523
+ with:
+ args: "publish -p $VSCE_TOKEN"
+ env:
+ VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
diff --git a/CHANGELOG.md.nightly b/CHANGELOG.md.nightly
new file mode 100644
index 0000000..f93a946
--- /dev/null
+++ b/CHANGELOG.md.nightly
@@ -0,0 +1,4 @@
+## 2020.3.x
+* Set the extension name for VS Code Go Nightly(`go-nightly`).
+* Pick up the pre-release version of `gopls` if available.
+* Disabled the telemetry report for VS Code Go.
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..71e3b94
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,16 @@
+name: "vscode-go"
+description:
+ "Fork of github.com/Microsoft/vscode-go (the VSCode plugin for Go). "
+ "This fork is kept in sync with the upstream while includes "
+ "new features go-tools@google.com team is developing and experimenting. "
+ ""
+
+third_party {
+ url {
+ type: GIT
+ value: "https://github.com/Microsoft/vscode-go"
+ }
+ version: "master"
+ last_upgrade_date { year: 2020 month: 1 day: 8 }
+ license_type: NOTICE
+}
diff --git a/README.md b/README.md
index e7adc9d..d5f4900 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,30 @@
-# Go for Visual Studio Code
+# Go Nightly for VS Code
-[![Join the chat at https://gitter.im/Microsoft/vscode-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/vscode-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/Microsoft/vscode-go.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-go)
+> ### **ATTENTION**
+>**Go Nightly for VS Code** is the insider version of
+[VS Code Go extension](https://github.com/microsoft/vscode-go)
+for early feedback and testing. This extension works best with
+[VS Code Insiders](https://code.visualstudio.com/insiders).
+Go Nightly contains previews of new features and bug fixes that are still
+under review or testing, so can be unstable. If you are looking for the stable version,
+please use [the stable version](https://marketplace.visualstudio.com/items?itemName=ms-vscode.go) instead.
+>
+> **NOTE:**
+If you have both stable (aka "Go") and nightly version (aka "Go Nightly") installed,
+you MUST DISABLE one of them. Docs on how to disable an extension can be found
+[here](https://code.visualstudio.com/docs/editor/extension-gallery#_disable-an-extension).
-This extension adds rich language support for the [Go language](https://golang.org/) to VS Code.
-
-Read the [Changelog](https://github.com/Microsoft/vscode-go/blob/master/CHANGELOG.md) to know what has changed over the last few versions of this extension.
+> ### Difference between VS Code Go and VS Code Go Nightly
+> - Go Nightly is maintained and released by Go Tools team at Google.
+> - Go Nightly is released more frequently than the stable version.
+> - Go Nightly includes features and bug fixes that are still under testing or not finalized yet.
+> - Go Nightly may use the latest pre-release versions of tools (e.g. `gopls`) instead of release versions.
+> - For now, Go and Go Nightly maintain separate repositories. Both repositories
+> welcome all contributors. For contribution to Go Nightly repo, see the Go
+> project's [contribution guide](https://golang.org/doc/contribute.html).
+> Go team members who has signed the Microsoft CLA will send a syncing PR upstream to
+> https://github.com/microsoft/vscode-go every two weeks.
+> - [Here](https://github.com/microsoft/vscode-go/compare/master...golang:master) is the full list of local modifications.
## Table of Contents
diff --git a/build/README.md b/build/README.md
new file mode 100644
index 0000000..cacccb2
--- /dev/null
+++ b/build/README.md
@@ -0,0 +1,88 @@
+## Continuous Integration Testing
+
+Currently we are using two separate CI systems to test all changes and pushed commits:
+Tests running in Google Cloud Build (GCB) and tests running with GitHub Action.
+It is a temporary setup; once GCB fully supports our desired workflow that works
+with the Go Git repository, we plan to use the GCB-based setup for CI.
+
+### Testing via GCB
+
+This workflow is triggered for Gerrit CLs (chosen by project members) and all
+the commits merged into the master branch.
+Note that our main repository is in `go.googlesource.com/vscode-go` and
+`github.com/golang/vscode-go` is a mirror of the Go Git repository.
+All PRs sent to `github.com/golang/vscode-go` will be converted as Gerrit CLs.
+Currently, the results of the CI Run are visible to only project members.
+We are working on improving this workflow - making the results visible to
+public and easily accessible through our Gerrit review UI.
+
+- `build/cloudbuild.yaml`, `build/all.bash` - define the GCB workflow.
+- `build/cloudbuild.container.yaml`, `build/Dockerfile` - define the Docker container used for CI.
+
+Project members (currently restricted to our GCP project members) can manually
+trigger cloud build and test their locally made changes.
+Follow the [GCB instruction](https://cloud.google.com/cloud-build/docs/running-builds/start-build-manually)
+to set up the environment and tools, and then run
+
+```
+$ gcloud builds submit --config=build/cloudbuild.yaml
+```
+
+In order to modify and rebuild the docker container image, run
+
+```
+$ gcloud builds submit --config=build/cloudbuild.container.yaml
+```
+
+### Testing via GitHub Action
+
+This is the workflow triggered for every PR and commit made to our mirror repository in github.com/golang/vscode-go. We are using this CI to run tests
+in the platforms which GCB does not support yet, and allow contributors
+to see the test results for their PRs. This workflow is not triggered by
+CLs sent via Gerrit yet.
+
+Until GCB-based CI is ready for general use, we recommend contributors
+to send PRs to github.com/golang/vscode-go as described in
+[the Go project contribution guide](https://golang.org/doc/contribute.html#sending_a_change_github). The results will be posted to the PR request.
+
+- `.github/workflows/ci.yml` - define the github action based CI workflow.
+
+## Nightly Release
+
+A new version is released based on what is committed on the `master` branch,
+at least once a day between Monday and Thursday. If there is no new commit,
+release does not happen. This nightly extension is a separate extension from
+the official Go extension, and is available at [the VS Code market place](https://marketplace.visualstudio.com/items?itemName=golang.go-nightly).
+
+The version number encodes the last commit timestamp of the master branch
+in the format of `YYYY.[M]M.[D]DHH`. For example, version 2020.3.702 indicates
+the extension is built with the last commit committed at ~2AM 2020/03/07 (UTC).
+
+- `.github/workflows/release.yml, build/all.bash` - define the daily release process.
+
+## Sync with upstream
+
+### Merging commits from upstream
+
+This is done manually by project members, probably before each nightly release.
+
+Once we consolidate the two repositories, this process becomes unnecessary.
+
+The merge script will create a Gerrit CL for merge and issue the GCB based test workflow.
+The remote `origin` should be set to `https://go.googlesource.com/vscode-go`.
+Make sure you have access to the GCB project and `gcloud` tool
+is available.
+
+```
+$ build/merge.sh
+```
+
+In case of conflicts, you will need to check out the cl, fix, and upload the
+updated cl again following the usual Gerrit CL workflow.
+
+### Reflecting commits to upstream
+
+Once the feature or bug fix tested with Nightly extension is stablized, create
+a PR to the upstream (github.com/microsoft/vscode-go).
+Please make sure to include all the gerrit CL numbers so the upstream code
+reviewers can find reference to all prior discussion.
diff --git a/build/all.bash b/build/all.bash
index 1a8e4a8..6dd46bf 100755
--- a/build/all.bash
+++ b/build/all.bash
@@ -51,6 +51,32 @@
docker run --workdir=/workspace -v "$(pwd):/workspace" vscode-test-env ci
}
+prepare_nightly() {
+ # Version format: YYYY.MM.DDHH based on the latest commit timestamp.
+ # e.g. 2020.1.510 is the version built based on a commit that was made
+ # on 2020/01/05 10:00
+ local VER=`git log -1 --format=%cd --date="format:%Y.%-m.%-d%H"`
+ local COMMIT=`git log -1 --format=%H`
+ echo "**** Preparing nightly release : $VER ***"
+
+ # Update package.json
+ (cat package.json | jq --arg VER "${VER}" '
+.version=$VER |
+.preview=true |
+.name="go-nightly" |
+.displayName="Go Nightly" |
+.publisher="golang" |
+.description="Rich Go language support for Visual Studio Code (Nightly)" |
+.author.name="Go Team at Google" |
+.repository.url="https://github.com/golang/vscode-go" |
+.bugs.url="https://github.com/golang/vscode-go/issues"
+') > /tmp/package.json && mv /tmp/package.json package.json
+
+ # Replace CHANGELOG.md with CHANGELOG.md.nightly + Release commit info.
+ # TODO(hyangah): Update README.md
+ printf "**Release ${VER} @ ${COMMIT}** \n\n" | cat - CHANGELOG.md.nightly > /tmp/CHANGELOG.md.new && mv /tmp/CHANGELOG.md.new CHANGELOG.md
+}
+
main() {
cd "$(root_dir)" # always run from the script root.
case "$1" in
@@ -70,9 +96,12 @@
setup_virtual_display
run_test
;;
+ "prepare_nightly")
+ prepare_nightly
+ ;;
*)
usage
exit 2
esac
}
-main $@
\ No newline at end of file
+main $@
diff --git a/build/cloudbuild.container.yaml b/build/cloudbuild.container.yaml
new file mode 100644
index 0000000..12d8ad7
--- /dev/null
+++ b/build/cloudbuild.container.yaml
@@ -0,0 +1,5 @@
+steps:
+- name: 'gcr.io/cloud-builders/docker'
+ args: ['build', '-t', 'gcr.io/$PROJECT_ID/vscode-test-env', '-f', 'build/Dockerfile', '.']
+images:
+ - 'gcr.io/$PROJECT_ID/vscode-test-env'
diff --git a/build/cloudbuild.yaml b/build/cloudbuild.yaml
new file mode 100644
index 0000000..a678121
--- /dev/null
+++ b/build/cloudbuild.yaml
@@ -0,0 +1,9 @@
+steps:
+- name: 'gcr.io/$PROJECT_ID/vscode-test-env'
+ entrypoint: "./build/all.bash"
+ args: ['ci']
+ env:
+ - 'BUILD=$BUILD_ID'
+ - 'PROJECT=$PROJECT_ID'
+ - 'REV=$REVISION_ID'
+timeout: 600s
diff --git a/build/merge.bash b/build/merge.bash
new file mode 100755
index 0000000..971f10a
--- /dev/null
+++ b/build/merge.bash
@@ -0,0 +1,34 @@
+#! /bin/bash
+set -euo pipefail
+
+# In order to sync with upstream, run merge.bash
+
+# TODO(hyangah): commands for building docker container and running tests locally with docker run.
+root_dir() {
+ local script_name=$(readlink -f "${0}")
+ local script_dir=$(dirname "${script_name}")
+ local parent_dir=$(dirname "${script_dir}")
+ echo "${parent_dir}"
+}
+
+ROOT="$(root_dir)"
+cd "${ROOT}" # always run from the root directory.
+
+WORKTREE="$(mktemp -d)"
+BRANCH="sync/merge-upstream-$(date +%Y%m%d%H%M%S)"
+
+git fetch
+git worktree add --track -b "${BRANCH}" "${WORKTREE}" origin/master
+
+cd "${WORKTREE}"
+export GIT_GOFMT_HOOK=off
+git merge --no-commit "origin/upstream" || echo "Ignoring conflict..."
+
+COMMIT=`git log --format=%h -n 1 "origin/upstream"`
+
+gcloud builds submit --config=build/cloudbuild.yaml || echo "Build failed. Please address the issue..."
+
+git commit -m "sync: merge microsoft/vscode-go@${COMMIT} into master"
+
+git codereview mail HEAD
+cd - && git worktree remove "${WORKTREE}"
diff --git a/package-lock.json b/package-lock.json
index fd74a28..1750715 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
- "name": "Go",
- "version": "0.14.1",
+ "name": "go-nightly",
+ "version": "0.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -108,27 +108,39 @@
"dev": true
},
"@types/mocha": {
- "version": "5.2.7",
- "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz",
- "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==",
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz",
+ "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==",
"dev": true
},
"@types/node": {
- "version": "12.12.35",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.35.tgz",
- "integrity": "sha512-ASYsaKecA7TUsDrqIGPNk3JeEox0z/0XR/WsJJ8BIX/9+SkMSImQXKWfU/yBrSyc7ZSE/NPqLu36Nur0miCFfQ==",
+ "version": "13.11.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz",
+ "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==",
"dev": true
},
"@types/semver": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.1.tgz",
- "integrity": "sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA==",
- "dev": true
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.1.0.tgz",
+ "integrity": "sha512-pOKLaubrAEMUItGNpgwl0HMFPrSAFic8oSVIvfu1UwcgGNmNyK9gyhBHKmBnUTwwVvpZfkzUC0GaMgnL6P86uA==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
},
"@types/sinon": {
- "version": "7.5.2",
- "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz",
- "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.0.tgz",
+ "integrity": "sha512-v2TkYHkts4VXshMkcmot/H+ERZ2SevKa10saGaJPGCJ8vh3lKrC4u663zYEeRZxep+VbG6YRDtQ6gVqw9dYzPA==",
+ "dev": true,
+ "requires": {
+ "@types/sinonjs__fake-timers": "*"
+ }
+ },
+ "@types/sinonjs__fake-timers": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz",
+ "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==",
"dev": true
},
"@types/vscode": {
@@ -178,6 +190,16 @@
"color-convert": "^1.9.0"
}
},
+ "anymatch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
"applicationinsights": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-1.4.0.tgz",
@@ -240,6 +262,12 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
+ "at-least-node": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
+ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
+ "dev": true
+ },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -269,6 +297,12 @@
"resolved": "https://registry.npmjs.org/better-curry/-/better-curry-1.6.0.tgz",
"integrity": "sha1-OPcWskyM7geiYqvEHCLDFOIOOGk="
},
+ "binary-extensions": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
+ "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
+ "dev": true
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -279,6 +313,15 @@
"concat-map": "0.0.1"
}
},
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
@@ -324,6 +367,22 @@
}
}
},
+ "chokidar": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
+ "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.1",
+ "braces": "~3.0.2",
+ "fsevents": "~2.1.1",
+ "glob-parent": "~5.1.0",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.2.0"
+ }
+ },
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
@@ -611,6 +670,15 @@
"websocket-driver": ">=0.5.1"
}
},
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -645,14 +713,15 @@
}
},
"fs-extra": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz",
+ "integrity": "sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g==",
"dev": true,
"requires": {
+ "at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
- "jsonfile": "^4.0.0",
- "universalify": "^0.1.0"
+ "jsonfile": "^6.0.1",
+ "universalify": "^1.0.0"
}
},
"fs.realpath": {
@@ -661,6 +730,13 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
+ "fsevents": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
+ "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
+ "dev": true,
+ "optional": true
+ },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -695,6 +771,15 @@
"path-is-absolute": "^1.0.0"
}
},
+ "glob-parent": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
"graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
@@ -827,6 +912,15 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
"is-buffer": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
@@ -845,12 +939,33 @@
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
"dev": true
},
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
"is-regex": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
@@ -942,12 +1057,13 @@
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonfile": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz",
+ "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
"dev": true,
"requires": {
- "graceful-fs": "^4.1.6"
+ "graceful-fs": "^4.1.6",
+ "universalify": "^1.0.0"
}
},
"jsonparse": {
@@ -994,12 +1110,12 @@
"dev": true
},
"log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
+ "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
"dev": true,
"requires": {
- "chalk": "^2.0.1"
+ "chalk": "^2.4.2"
}
},
"mime-db": {
@@ -1038,13 +1154,14 @@
}
},
"mocha": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz",
- "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
+ "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==",
"dev": true,
"requires": {
"ansi-colors": "3.2.3",
"browser-stdout": "1.3.1",
+ "chokidar": "3.3.0",
"debug": "3.2.6",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
@@ -1053,11 +1170,11 @@
"growl": "1.10.5",
"he": "1.2.0",
"js-yaml": "3.13.1",
- "log-symbols": "2.2.0",
+ "log-symbols": "3.0.0",
"minimatch": "3.0.4",
- "mkdirp": "0.5.4",
+ "mkdirp": "0.5.3",
"ms": "2.1.1",
- "node-environment-flags": "1.0.5",
+ "node-environment-flags": "1.0.6",
"object.assign": "4.1.0",
"strip-json-comments": "2.0.1",
"supports-color": "6.0.0",
@@ -1098,9 +1215,9 @@
}
},
"mkdirp": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
- "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
+ "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
@@ -1138,9 +1255,9 @@
}
},
"node-environment-flags": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
- "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
+ "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
"dev": true,
"requires": {
"object.getownpropertydescriptors": "^2.0.3",
@@ -1155,6 +1272,12 @@
}
}
},
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
@@ -1264,10 +1387,16 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
+ "picomatch": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
+ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
+ "dev": true
+ },
"prettier": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
- "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz",
+ "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==",
"dev": true
},
"psl": {
@@ -1285,6 +1414,15 @@
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
+ "readdirp": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
+ "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.0.4"
+ }
+ },
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
@@ -1325,9 +1463,9 @@
"dev": true
},
"resolve": {
- "version": "1.15.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
- "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
+ "version": "1.16.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz",
+ "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -1353,9 +1491,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ "version": "7.3.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
+ "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ=="
},
"set-blocking": {
"version": "2.0.0",
@@ -1438,9 +1576,9 @@
}
},
"string.prototype.trimend": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz",
- "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
+ "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
@@ -1470,9 +1608,9 @@
}
},
"string.prototype.trimstart": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz",
- "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
+ "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
@@ -1503,6 +1641,15 @@
"has-flag": "^3.0.0"
}
},
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
@@ -1524,9 +1671,9 @@
"dev": true
},
"tslint": {
- "version": "5.20.1",
- "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz",
- "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==",
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.1.tgz",
+ "integrity": "sha512-kd6AQ/IgPRpLn6g5TozqzPdGNZ0q0jtXW4//hRcj10qLYBaa3mTUU2y2MCG+RXZm8Zx+KZi0eA+YCrMyNlF4UA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -1537,10 +1684,10 @@
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
+ "mkdirp": "^0.5.3",
"resolve": "^1.3.2",
"semver": "^5.3.0",
- "tslib": "^1.8.0",
+ "tslib": "^1.10.0",
"tsutils": "^2.29.0"
},
"dependencies": {
@@ -1587,9 +1734,9 @@
"dev": true
},
"universalify": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
+ "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
"dev": true
},
"uri-js": {
@@ -1643,12 +1790,19 @@
"integrity": "sha512-JvONPptw3GAQGXlVV2utDcHx0BiY34FupW/kI6mZ5x06ER5DdPG/tXWMVHjTNULF5uKPOUUD0SaXg5QaubJL0A=="
},
"vscode-languageclient": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.1.0.tgz",
- "integrity": "sha512-Tcp0VoOaa0YzxL4nEfK9tsmcy76Eo8jNLvFQZwh2c8oMm02luL8uGYPLQNAiZ3XGgegfcwiQFZMqbW7DNV0vxA==",
+ "version": "6.1.3",
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-6.1.3.tgz",
+ "integrity": "sha512-YciJxk08iU5LmWu7j5dUt9/1OLjokKET6rME3cI4BRpiF6HZlusm2ZwPt0MYJ0lV5y43sZsQHhyon2xBg4ZJVA==",
"requires": {
"semver": "^6.3.0",
- "vscode-languageserver-protocol": "^3.15.2"
+ "vscode-languageserver-protocol": "^3.15.3"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ }
}
},
"vscode-languageserver-protocol": {
diff --git a/package.json b/package.json
index 8f7f4b7..fb6541d 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,13 @@
{
- "name": "Go",
- "version": "0.14.1",
- "publisher": "ms-vscode",
- "description": "Rich Go language support for Visual Studio Code",
+ "name": "go-nightly",
+ "displayName": "Go Nightly",
+ "version": "0.0.0",
+ "publisher": "golang",
+ "description": "Rich Go language support for Visual Studio Code (Nightly)",
"author": {
- "name": "Microsoft Corporation - Development Labs"
+ "name": "Go Team at Google"
},
+ "preview": true,
"license": "MIT",
"icon": "images/go-logo-blue.png",
"categories": [
@@ -22,7 +24,10 @@
"private": true,
"repository": {
"type": "git",
- "url": "https://github.com/Microsoft/vscode-go.git"
+ "url": "https://github.com/golang/vscode-go"
+ },
+ "bugs": {
+ "url": "https://github.com/golang/vscode-go/issues"
},
"keywords": [
"multi-root ready"
@@ -40,33 +45,33 @@
},
"extensionDependencies": [],
"dependencies": {
- "diff": "^4.0.1",
+ "diff": "^4.0.2",
"json-rpc2": "^1.0.2",
"moment": "^2.24.0",
- "semver": "^6.3.0",
+ "semver": "^7.3.2",
"tree-kill": "^1.2.2",
- "vscode-debugadapter": "^1.36.0",
- "vscode-debugprotocol": "^1.36.0",
+ "vscode-debugadapter": "^1.40.0",
+ "vscode-debugprotocol": "^1.40.0",
"vscode-extension-telemetry": "^0.1.2",
- "vscode-languageclient": "6.1.0",
+ "vscode-languageclient": "^6.1.3",
"web-request": "^1.0.7"
},
"devDependencies": {
- "@types/fs-extra": "^8.0.0",
+ "@types/fs-extra": "^8.1.0",
"@types/glob": "^7.1.1",
- "@types/mocha": "^5.2.7",
- "@types/node": "^12.7.2",
- "@types/semver": "^6.0.1",
- "@types/sinon": "^7.5.2",
- "@types/vscode": "^1.25.0",
- "fs-extra": "^8.1.0",
- "glob": "^7.1.4",
- "mocha": "^6.2.0",
- "prettier": "^1.16.4",
- "sinon": "^9.0.1",
- "tslint": "^5.19.0",
- "typescript": "^3.7.2",
- "vscode-test": "^1.2.3"
+ "@types/mocha": "^7.0.2",
+ "@types/node": "^13.11.1",
+ "@types/semver": "^7.1.0",
+ "@types/sinon": "^9.0.0",
+ "@types/vscode": "^1.44.0",
+ "fs-extra": "^9.0.0",
+ "glob": "^7.1.6",
+ "mocha": "^7.1.1",
+ "prettier": "^2.0.4",
+ "sinon": "^9.0.2",
+ "tslint": "^6.1.1",
+ "typescript": "^3.8.3",
+ "vscode-test": "^1.3.0"
},
"engines": {
"vscode": "^1.41.0"
diff --git a/src/avlTree.ts b/src/avlTree.ts
index b9c146d..56ac9ce 100644
--- a/src/avlTree.ts
+++ b/src/avlTree.ts
@@ -41,7 +41,31 @@
* @param key The key of the new node.
* @param value The value of the new node.
*/
- constructor(public key: K, public value: V) {}
+ constructor(public key: K, public value: V) { }
+
+ /**
+ * Convenience function to get the height of the left child of the node,
+ * returning -1 if the node is null.
+ * @return The height of the left child, or -1 if it doesn't exist.
+ */
+ public get leftHeight(): number {
+ if (!this.left) {
+ return -1;
+ }
+ return this.left.height;
+ }
+
+ /**
+ * Convenience function to get the height of the right child of the node,
+ * returning -1 if the node is null.
+ * @return The height of the right child, or -1 if it doesn't exist.
+ */
+ public get rightHeight(): number {
+ if (!this.right) {
+ return -1;
+ }
+ return this.right.height;
+ }
/**
* Performs a right rotate on this node.
@@ -78,30 +102,6 @@
other.height = Math.max(other.rightHeight, this.height) + 1;
return other;
}
-
- /**
- * Convenience function to get the height of the left child of the node,
- * returning -1 if the node is null.
- * @return The height of the left child, or -1 if it doesn't exist.
- */
- public get leftHeight(): number {
- if (!this.left) {
- return -1;
- }
- return this.left.height;
- }
-
- /**
- * Convenience function to get the height of the right child of the node,
- * returning -1 if the node is null.
- * @return The height of the right child, or -1 if it doesn't exist.
- */
- public get rightHeight(): number {
- if (!this.right) {
- return -1;
- }
- return this.right.height;
- }
}
export type DistanceFunction<K> = (a: K, b: K) => number;
diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index eee3841..f82bb8f 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -8,6 +8,7 @@
import cp = require('child_process');
import fs = require('fs');
import path = require('path');
+import { SemVer } from 'semver';
import vscode = require('vscode');
import { getLanguageServerToolPath } from './goLanguageServer';
import { envPath, getToolFromToolPath } from './goPath';
@@ -18,6 +19,7 @@
disableModulesForWildcard,
getConfiguredTools,
getImportPath,
+ getImportPathWithVersion,
getTool,
hasModSuffix,
isGocode,
@@ -89,11 +91,21 @@
}
/**
+ * ToolAtVersion is a Tool with version annotation.
+ * Lack of version implies the latest version
+ */
+export interface ToolAtVersion extends Tool {
+ version?: SemVer;
+}
+
+/**
* Installs given array of missing tools. If no input is given, the all tools are installed
*
- * @param string[] array of tool names to be installed
+ * @param missing array of tool names and optionally, their versions to be installed.
+ * If a tool's version is not specified, it will install the latest.
+ * @param goVersion version of Go that affects how to install the tool. (e.g. modules vs legacy GOPATH mode)
*/
-export function installTools(missing: Tool[], goVersion: GoVersion): Promise<void> {
+export function installTools(missing: ToolAtVersion[], goVersion: GoVersion): Promise<void> {
const goRuntimePath = getBinPath('go');
if (!goRuntimePath) {
vscode.window.showErrorMessage(
@@ -169,7 +181,11 @@
outputChannel.appendLine(installingMsg);
missing.forEach((missingTool) => {
- outputChannel.appendLine(' ' + missingTool.name);
+ let toolName = missingTool.name;
+ if (missingTool.version) {
+ toolName += '@' + missingTool.version;
+ }
+ outputChannel.appendLine(' ' + toolName);
});
outputChannel.appendLine(''); // Blank line for spacing.
@@ -178,7 +194,7 @@
const toolsTmpDir = fs.mkdtempSync(getTempFilePath('go-tools-'));
return missing
- .reduce((res: Promise<string[]>, tool: Tool) => {
+ .reduce((res: Promise<string[]>, tool: ToolAtVersion) => {
return res.then(
(sofar) =>
new Promise<string[]>((resolve, reject) => {
@@ -199,18 +215,18 @@
env: envForTools,
cwd: toolsTmpDir
};
-
const callback = (err: Error, stdout: string, stderr: string) => {
// Make sure to delete the temporary go.mod file, if it exists.
if (tmpGoModFile && fs.existsSync(tmpGoModFile)) {
fs.unlinkSync(tmpGoModFile);
}
+ const importPath = getImportPathWithVersion(tool, tool.version, goVersion);
if (err) {
- outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' FAILED');
+ outputChannel.appendLine('Installing ' + importPath + ' FAILED');
const failureReason = tool.name + ';;' + err + stdout.toString() + stderr.toString();
resolve([...sofar, failureReason]);
} else {
- outputChannel.appendLine('Installing ' + getImportPath(tool, goVersion) + ' SUCCEEDED');
+ outputChannel.appendLine('Installing ' + importPath + ' SUCCEEDED');
resolve([...sofar, null]);
}
};
@@ -246,11 +262,17 @@
if (hasModSuffix(tool)) {
args.push('-d');
}
- args.push(getImportPath(tool, goVersion));
+ let importPath: string;
+ if (modulesOffForTool) {
+ importPath = getImportPath(tool, goVersion);
+ } else {
+ importPath = getImportPathWithVersion(tool, tool.version, goVersion);
+ }
+ args.push(importPath);
cp.execFile(goRuntimePath, args, opts, (err, stdout, stderr) => {
if (stderr.indexOf('unexpected directory layout:') > -1) {
outputChannel.appendLine(
- `Installing ${tool.name} failed with error "unexpected directory layout". Retrying...`
+ `Installing ${importPath} failed with error "unexpected directory layout". Retrying...`
);
cp.execFile(goRuntimePath, args, opts, callback);
} else if (!err && hasModSuffix(tool)) {
@@ -320,7 +342,6 @@
return;
}
}
-
const installOptions = ['Install'];
let missing = await getMissingTools(goVersion);
if (!containsTool(missing, tool)) {
@@ -352,23 +373,27 @@
});
}
-export async function promptForUpdatingTool(toolName: string) {
+export async function promptForUpdatingTool(toolName: string, newVersion?: SemVer) {
const tool = getTool(toolName);
+ const toolVersion = {...tool, version: newVersion}; // ToolWithVersion
// If user has declined to update, then don't prompt.
if (containsTool(declinedUpdates, tool)) {
return;
}
const goVersion = await getGoVersion();
- const updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`;
+ let updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`;
const choices: string[] = ['Update'];
if (toolName === `gopls`) {
- choices.push('Release Notes'); // TODO(hyangah): pass more info such as version, release note location.
+ choices.push('Release Notes');
+ }
+ if (newVersion) {
+ updateMsg = `New version of ${tool.name} (${newVersion}) is available. Please update for an improved experience.`;
}
vscode.window.showInformationMessage(updateMsg, ...choices).then((selected) => {
switch (selected) {
case 'Update':
- installTools([tool], goVersion);
+ installTools([toolVersion], goVersion);
break;
case 'Release Notes':
vscode.commands.executeCommand(
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index 5be6225..5252b60 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -38,7 +38,7 @@
import { GoWorkspaceSymbolProvider } from './goSymbol';
import { getTool, Tool } from './goTools';
import { GoTypeDefinitionProvider } from './goTypeDefinition';
-import { getBinPath, getCurrentGoPath, getGoConfig, getToolsEnvVars } from './util';
+import { getBinPath, getCurrentGoPath, getGoConfig, getToolsEnvVars, isForNightly } from './util';
interface LanguageServerConfig {
enabled: boolean;
@@ -80,9 +80,10 @@
// If installed, check. The user may not have the most up-to-date version of the language server.
const tool = getTool(toolName);
- const update = await shouldUpdateLanguageServer(tool, languageServerToolPath, config.checkForUpdates);
- if (update) {
- promptForUpdatingTool(toolName);
+ const versionToUpdate = await shouldUpdateLanguageServer(tool, languageServerToolPath, config.checkForUpdates);
+
+ if (versionToUpdate) {
+ promptForUpdatingTool(toolName, versionToUpdate);
}
const c = new LanguageClient(
@@ -340,33 +341,35 @@
tool: Tool,
languageServerToolPath: string,
makeProxyCall: boolean
-): Promise<boolean> {
+): Promise<semver.SemVer> {
// Only support updating gopls for now.
if (tool.name !== 'gopls') {
- return false;
+ return null;
}
// First, run the "gopls version" command and parse its results.
- // If "gopls" is so old that it doesn't have the "gopls version" command,
- // or its version doesn't match our expectations, prompt the user to download.
const usersVersion = await goplsVersion(languageServerToolPath);
- if (!usersVersion) {
- return true;
- }
// We might have a developer version. Don't make the user update.
if (usersVersion === '(devel)') {
- return false;
+ return null;
}
- // Get the latest gopls version.
- let latestVersion = makeProxyCall ? await latestGopls(tool) : defaultLatestVersion;
+ // Get the latest gopls version. If it is for nightly, using the prereleased version is ok.
+ let latestVersion = makeProxyCall ? await latestGopls(tool, isForNightly) : defaultLatestVersion;
// If we failed to get the gopls version, pick the one we know to be latest at the time of this extension's last update
if (!latestVersion) {
latestVersion = defaultLatestVersion;
}
+ // If "gopls" is so old that it doesn't have the "gopls version" command,
+ // or its version doesn't match our expectations, usersVersion will be empty.
+ // Suggest the latestVersion.
+ if (!usersVersion) {
+ return latestVersion;
+ }
+
// The user may have downloaded golang.org/x/tools/gopls@master,
// which means that they have a pseudoversion.
const usersTime = parsePseudoversionTimestamp(usersVersion);
@@ -376,12 +379,12 @@
if (!latestTime) {
latestTime = defaultLatestVersionTime;
}
- return usersTime.isBefore(latestTime);
+ return usersTime.isBefore(latestTime) ? latestVersion : null;
}
// If the user's version does not contain a timestamp,
// default to a semver comparison of the two versions.
- return semver.lt(usersVersion, latestVersion);
+ return semver.lt(usersVersion, latestVersion) ? latestVersion : null;
}
// Copied from src/cmd/go/internal/modfetch.
@@ -435,7 +438,7 @@
return time;
}
-async function latestGopls(tool: Tool): Promise<semver.SemVer> {
+async function latestGopls(tool: Tool, includePrerelease: boolean): Promise<semver.SemVer> {
// If the user has a version of gopls that we understand,
// ask the proxy for the latest version, and if the user's version is older,
// prompt them to update.
@@ -457,6 +460,9 @@
}
versions.sort(semver.rcompare);
+ if (includePrerelease) {
+ return versions[0]; // The first one in the prerelease.
+ }
// The first version in the sorted list without a prerelease tag.
return versions.find((version) => !version.prerelease || !version.prerelease.length);
}
diff --git a/src/goMain.ts b/src/goMain.ts
index 4620a39..52701ad 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -5,7 +5,6 @@
'use strict';
-import fs = require('fs');
import * as path from 'path';
import vscode = require('vscode');
import { browsePackages } from './goBrowsePackage';
diff --git a/src/goTools.ts b/src/goTools.ts
index 9030a5b..30fccb4 100644
--- a/src/goTools.ts
+++ b/src/goTools.ts
@@ -5,6 +5,7 @@
'use strict';
+import { SemVer } from 'semver';
import { goLiveErrorsEnabled } from './goLiveErrors';
import { getGoConfig, GoVersion } from './util';
@@ -28,6 +29,13 @@
return tool.importPath;
}
+export function getImportPathWithVersion(tool: Tool, version: SemVer, goVersion: GoVersion): string {
+ const importPath = getImportPath(tool, goVersion);
+ if (version) {
+ return importPath + '@v' + version;
+ }
+ return importPath;
+}
/**
* Returns boolean denoting if the import path for the given tool ends with `/...`
* and if the version of Go supports installing wildcard paths in module mode.
diff --git a/src/telemetry.ts b/src/telemetry.ts
index c417c44..4070b43 100644
--- a/src/telemetry.ts
+++ b/src/telemetry.ts
@@ -6,10 +6,10 @@
import vscode = require('vscode');
import TelemetryReporter from 'vscode-extension-telemetry';
-export const extensionId: string = 'ms-vscode.Go';
+export const extensionId: string = 'golang.go-nightly';
const extension = vscode.extensions.getExtension(extensionId);
const extensionVersion: string = extension ? extension.packageJSON.version : '';
-const aiKey: string = 'AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217';
+const aiKey: string = ''; // Empty aiKey disables telemetry.
export function sendTelemetryEventForModulesUsage() {
/* __GDPR__
diff --git a/src/util.ts b/src/util.ts
index a5525ba..295422c 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1023,3 +1023,6 @@
}
return false;
}
+
+// isForNightly is true if the source code is built for a preview version of the extension.
+export const isForNightly: boolean = extensionId.endsWith('.go-nightly');