Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/vscode-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: hyangah/vscode-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 26 files changed
  • 1 contributor

Commits on Oct 9, 2024

  1. extension/src/goInstallTools.ts: require go1.21+ for tools installation

    The Go extension will require go1.21 for tools installation from v0.44.0
    (and is prerelease version v0.43.x).
    
    This is a planned change and it was discussed in the v0.42.0 release note.
    (https://github.com/golang/vscode-go/releases/tag/v0.42.0 Jul 17 2024).
    
    `installTools` is the entry function for tools installation.
    If the go version is too old, it suggests go1.21+ or the workaround
    (go.toolsManagement.go).
    
    * Misc changes
     - Previously, when the build info of a binary is not available,
       we didn't ask to update the tool. Since go1.18, the build info
       should be available. So, now suggest to reinstall the tool.
     - Bug fix: For vscgo, we used toolExecutionEnvironment when running
       go install.
       It should be toolInstallationEnvironment. This clears some env vars
       like GO111MODULE, GOPROXY, GOOS, GOARCH, GOROOT which can interfere
       with the go tool invocation.
    
    Fixes #3411
    
    Change-Id: Ifff0661d88a9adfc6bd3e0a25702d91921bcb77f
    hyangah committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    81f04c5 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. extension: update go to go1.23.1

    We want to use the latest go when developing our own
    release/testing support tools and scripts.
    So, update go.mod to do so.
    
    However, we need to be careful when using
    the `installtools` script.
    The purpose of `installtools` is to install tools
    needed by integration tests. It selected the latest
    version of each tool compatible with the default
    go version in the system. For example, in the CI is
    setup with go1.22, we want to install tools that
    officially claim they support go1.22.
    
    `installtools` detects the go version using
    the `go` command. As we change our go.mod to use
    go1.23.1 as the go directive, the `go` command running
    under our project's repo directory (with GOTOOLCHAIN=auto)
    will always be go1.23.1 or newer. That makes go1.22 CI
    meaningless.
    
    So, pass `GOTOOLCHAIN=local` when `installtools` computes
    the go version using `go list`.
    
    Previously we used `go run` to build/invoke this tool.
    But it turned out `go run`/`go generate` modify
    (or will modify) `GOROOT` and/or `PATH` when toolchain
    switch occurs, which will prevent `installtools`
    from detecting the system default toolchain version
    even with `GOTOOLCHAIN=local`, or cause the
    build fail due to mismatching GOROOT and go toolchain
    picked up from PATH.
    
    Therefore, in this CL, we build the binary (it's ok to
    build the binary with go1.23.1+), and then run
    the installed binary ourselves so the execution of
    the binary doesn't get inherit the modified GOROOT/PATH.
    
    For #3411
    
    Change-Id: I3e116cf48fb431196359ec42049e70c0b75814ef
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    b4defa9 View commit details
    Browse the repository at this point in the history
  2. extension/tools/goplssetting: update copy of gopls json-api types

    The types are moved to tools/gopls/internal/doc/api.go.
    
    Remove `JSON` suffix from each name.
    
    Change-Id: Ic5dae90f83f32f241a1e128aecd7def92aff34bc
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    9017f1e View commit details
    Browse the repository at this point in the history
  3. extension/tools/goplssetting: handle enum types

    gopls v0.17 will have LinksInHover that is the true|false|"gopls"
    enum type. Previously, we assumed enum type is always string. That
    is no longer true. Handle this sum-type enum.
    
    For golang/go#68057
    
    Change-Id: I9eb2e8376191d997895f8998bfffb2662fbfb92e
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    f19b641 View commit details
    Browse the repository at this point in the history
  4. extension/src/goTools.ts: remove unused prerelease version info

    latestPrereleaseVersion and latestPrereleaseVersionTimestamp
    fields are not read.
    
    Usually, the prerelease version lasts short and it becomes
    obsolete by the stable version, so this info often gets
    outdated anyway.
    
    Change-Id: If0513e3a95426dc1ff1803542aa981d7aed00593
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    54908e0 View commit details
    Browse the repository at this point in the history
  5. extension/src/goTools.ts: remove 'replacedByGopls' field

    FORCE RUN CI
    
    This field was added when we were deprecating several tools with gopls
    gradually and we wanted to keep the complexity of `getConfiguredTools`
    manageable. Now we have only a handful number of tools. Remove it.
    
    Also, remove the custom formatter check in getConfiguredTools.
    The idea was to add a custom formatter tool to the configured tools list
    if the user configured "go.formatTool": "custom". But, since custom tool
    name won't be in `allToolsInformation`, so the custom tool won't be
    included in the list anyway. (We install only tools known to us).
    
    Change-Id: I4b26d3756fe45e1cc29f8434b1b5d83ee8977d47
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    bc99bc2 View commit details
    Browse the repository at this point in the history
  6. extension/test/runTest.ts: disable D-Bus comm for test execution

    This suppresses the "Failed to connect to the bus" error.
    
    Change-Id: Ie193b92085906121ba337bcf4a3af4428c87b31e
    hyangah committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    a68b4d0 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. extension/test/runTest.ts: set GOTOOLCHAIN=local

    FORCE RUN CI
    
    This script runs in CI with the go version under testing.
    Prevent the go toolchain switch from getting influenced by
    extension/go.mod's choice of go version.
    
    Add a go.mod file with go1.12 to testdata/envTest
    to prevent go toolchain switch to go1.23 (which will fail
    due to GOTOOLCHAIN=local).
    
    Change-Id: I02f1cd6512a0030a729668221b163f6cc3e26b0f
    hyangah committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    5a30005 View commit details
    Browse the repository at this point in the history
  2. wip: test

    FORCE RUN CI
    
    Change-Id: If436bb675dd5e5e8a5782621f273c5c16247493d
    hyangah committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    889f935 View commit details
    Browse the repository at this point in the history
Loading