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: v0.51.0
Choose a base ref
...
head repository: golang/vscode-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 17 commits
  • 36 files changed
  • 5 contributors

Commits on Sep 4, 2025

  1. CHANGELOG.md: add release heading for v0.51.0

    This is an automated CL which updates the CHANGELOG.md.
    
    Change-Id: Ia5324fd75bb1b38a9d51d05bfe83041fe8c09443
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/701136
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    Reviewed-by: Hongxiang Jiang <[email protected]>
    Auto-Submit: Gopher Robot <[email protected]>
    gopherbot committed Sep 4, 2025
    Configuration menu
    Copy the full SHA
    721a8ca View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2025

  1. extension/src: remove gopls issue report prompting

    When gopls fails to start, we prompt the user to
    file a GitHub issue. Example: #3865
    These reports have not proven very helpful as most users do not fill in
    any additional information associated with the crash.
    Also we have gopls telemetry / stacks information to
    analyze such errors. We should remove VSCode's prompting.
    
    Change-Id: I0f8b3ade9484d029b5e5876488032c52ce367423
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/702435
    Reviewed-by: Robert Findley <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    madelinekalil committed Sep 11, 2025
    Configuration menu
    Copy the full SHA
    6f77bbd View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2025

  1. extension/src: use full path mode when running go test

    The fullpath mode is added in go 1.21 and the vscode-go is supporting
    the last three minor Go versions (1.23.0+ as of 2025-09).
    
    If the user is beyond the support, the extension will send a
    notification asking user to upgrade.
    
    In case user does not want to upgrade, set "-test.fullpath=false"
    to setting "go.testFlags" will fall back to the original behavior.
    
    Fix #3853
    
    Change-Id: I06b723b715651ea0bf98ae62797917af7b1c74b2
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/704776
    Reviewed-by: Madeline Kalil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang committed Sep 23, 2025
    Configuration menu
    Copy the full SHA
    ddc8268 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2025

  1. extension/src/utils: Support exported environment variables with go.t…

    …estEnvFile
    
    This changes adds support for exported environment variables in environment files with the go.testEnvFile configuration option
    
    Fixes #3879
    
    Change-Id: Idd7073fb8efaf93a15d51a2bfab4c361911efa4f
    GitHub-Last-Rev: 5bfe028
    GitHub-Pull-Request: #3880
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/706135
    Reviewed-by: Hongxiang Jiang <[email protected]>
    Reviewed-by: Junyang Shao <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    sapenmsoft authored and gopherbot committed Sep 26, 2025
    Configuration menu
    Copy the full SHA
    5b8a911 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2025

  1. extension/src/language: attach selected range to hover request

    The middleware API allow the extension developer to modify the
    input parameter of the call back function "next" but does not
    allow the extension developer to introduce new arguments.
    
    The vscode-languageclient still responsible for the putting up
    the final parameter and send to gopls.
    
    Based on the proposal from microsoft/language-server-protocol#377,
    the final state is introducing a "range" field in PositionParams.
    I think it make more sense to call a separate gopls command
    "gopls.lsp" with method "hover" (CL 706335) instead of forcely
    embeding a "range" field to the "position" field.
    
    The vscode-go extension only send the selected range if the range
    and the original position come from the same text document.
    
    For golang/go#69058
    
    Change-Id: Ie65a5d62d220882865a22f3749ed9330b6234975
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/706336
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    h9jiang authored and gopherbot committed Oct 1, 2025
    Configuration menu
    Copy the full SHA
    b108487 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2025

  1. src: skip version check for golangci-lint

    For #3843
    
    Change-Id: I53029068b8baae51d120e30aeeb6ac731e8839f9
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/708497
    Auto-Submit: Hongxiang Jiang <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    h9jiang authored and gopherbot committed Oct 2, 2025
    Configuration menu
    Copy the full SHA
    bca1404 View commit details
    Browse the repository at this point in the history
  2. extension/src: replace tools information map with Map<string, Tool>

    It is suggested in style guide to use Map<string, Tool> instead of
    index signature. This make the code more readbale and easier to
    figure out whether a tool exist in the map.
    
    Also add ReadonlyMap to avoid any accident write to the static map.
    
    See https://google.github.io/styleguide/tsguide.html#indexable-key-string-type
    
    For #3697
    
    Change-Id: I87976d2cd878d5c7bd99f5ad886ee98dd463cfeb
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/708535
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    h9jiang authored and gopherbot committed Oct 2, 2025
    Configuration menu
    Copy the full SHA
    c8ab8fb View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2025

  1. extension/src: remove default setting for "go.lintTool"

    The "lintTool" will be the source of truth indicating which tool
    will be run as linter. vscode-go will now execute the exactly
    tool based on this setting without any hidden yield logic.
    
    Previously, the default value for "go.lintTool" is "staticcheck",
    vscode-go have special logic that yield the linter functionality
    to gopls if the lint tool is staticcheck and gopls staticheck is
    enabled. It confuses the user which tool will be executed.
    
    This CL removes this default option from "go.lintTool", consider
    the new default as "". An empty lintTool indicates the user does
    not want any linter to run from the extension.
    
    This CL also change the description of "go.lintTool" to the lint
    tool in addition to gopls, also mention in the description that
    the linting functionality provided by gopls (the language server)
    can be configured in a seprate setting.
    
    To eliminate further confusions, a validation logic will be
    triggered when gopls or go configuration changed: if "staticcheck"
    is chosen as lintTool and gopls staticcheck is enabled. Warning
    will be sent to user to disable one of them to avoid duplicate
    diagnostics.
    
    Alternative considered: introduce "gopls" as default lintTool.
    
    For #3862
    
    Change-Id: Ia00ca115ca7ec34315043ad61517b5cdfb9ca1ed
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/709035
    Reviewed-by: Madeline Kalil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang committed Oct 18, 2025
    Configuration menu
    Copy the full SHA
    d431b5e View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2025

  1. extension: add compiler optimization details command to setting

    The "go.editorContextMenuCommands" setting controls which commands are available from the right-click context menu.
    
    This CL adds an additional field on that setting - "compilerDetails" - that when set to true will show the "Go: Toggle compiler optimization details" command in the context menu.
    
    Previously, this command could only be run via the command palette.
    
    Fixes #3899
    
    Change-Id: I9e3347e9c3dd648772eb37403acd0d1219fbef48
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/712381
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Hongxiang Jiang <[email protected]>
    madelinekalil committed Oct 21, 2025
    Configuration menu
    Copy the full SHA
    625a648 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2025

  1. extension/src: run formatter specified from setting "go.formatTool"

    This change is similar to CL 709035. The "formatTool" will be the
    source of truth indicating which tool will be run as formatter.
    vscode-go will now execute the exact tool based on the setting without
    any special yielding logic.
    
    This change is slightly different from CL 709035. The default value
    for "formatTool" is "default". To avoid any disruption, the "default"
    will be interpreted as no formatter provided and gopls will handle
    the formatting.
    
    In addition, an E2E test is added to test the formatter behavior:
    - Create unformatted go file, and prepare mock formatters.
    - Execute vscode "Format file" command.
    - Read the formatted go file from vscode buffer.
    - Compare the content from buffer with the desired state.
    
    For #3861
    
    Change-Id: Ib39b1845fb3b9a058c71dd1ab36f4ad5b9fe22b2
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/713200
    Auto-Submit: Hongxiang Jiang <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    Reviewed-by: Alan Donovan <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang authored and gopherbot committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    ddae161 View commit details
    Browse the repository at this point in the history
  2. extension/src: remove unused input gopls config parameter

    Change-Id: I640dc6a999a4ed58ef740edf4cb67b22a8b94f85
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/713201
    Reviewed-by: Madeline Kalil <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang authored and gopherbot committed Oct 22, 2025
    Configuration menu
    Copy the full SHA
    8c27f29 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2025

  1. extension/src: update debug adapter launch.json schema

    Update the launch.json schema described in package.json and in the
    documentation to match features added to Delve in the last two years.
    
    Change-Id: Ic6a022f7188d7ffd3ca22bf1f029dc521896d06d
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/714100
    Reviewed-by: Hongxiang Jiang <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    Reviewed-by: Madeline Kalil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    aarzilli authored and gopherbot committed Oct 23, 2025
    Configuration menu
    Copy the full SHA
    392bfe0 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2025

  1. extension/src: refactor required tool function

    Validate the behavior of third party tool installation. When gopls
    is enabled, third party tools that is replaced by gopls will not
    be installed by default. (e.g. "gotests", "gomodifytags") But will
    be installed if user explicitly triggers the legacy commands.
    
    For #1652
    
    Change-Id: I8754f013f252b221a981f6d7ebc5d71aa2440d14
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/713680
    Reviewed-by: Peter Weinberger <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang committed Oct 24, 2025
    Configuration menu
    Copy the full SHA
    138e1e8 View commit details
    Browse the repository at this point in the history
  2. extension/src: validate format tool settings

    If "go.formatTool" enabled from both client (vscode-go) and server
    (gopls), a warning will be sent to user to avoid duplicate formatting.
    
    If "gofumpt" and "gofmt" is set as "go.formatTool", an one time
    suggestion will be sent to user to enable it in gopls configuration.
    
    For #3861
    
    Change-Id: Ib9afd232a3b29eb5de32dd575411e5a4f35100c9
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/713620
    Reviewed-by: Madeline Kalil <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang authored and gopherbot committed Oct 24, 2025
    Configuration menu
    Copy the full SHA
    97bd899 View commit details
    Browse the repository at this point in the history
  3. CHANGELOG.md: include tool management refactoring entry

    Fix #3861
    Fix #3862
    Fix #3898
    
    Change-Id: I711fbe38dbb20d9deac3e1ea8891a1dafe98c558
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/713940
    Auto-Submit: Hongxiang Jiang <[email protected]>
    Reviewed-by: Alan Donovan <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang authored and gopherbot committed Oct 24, 2025
    Configuration menu
    Copy the full SHA
    0c4e6b5 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2025

  1. CHANGELOG.md: add release heading for v0.51.1

    This is an automated CL which updates the CHANGELOG.md.
    
    Change-Id: I35957152dcc71b57b4752c09be5d715dfe98532c
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/715280
    Reviewed-by: Madeline Kalil <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Hongxiang Jiang <[email protected]>
    Auto-Submit: Gopher Robot <[email protected]>
    gopherbot committed Oct 27, 2025
    Configuration menu
    Copy the full SHA
    36d95e2 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2025

  1. extension/src: getFormatTool return "customFormatter" instead of path

    Previously, getFormatTool returns the path specified in
    go.alternateTools, but the tool existence check is expecting a tool
    name not a tool path.
    
    Instead of returning a path, getFormatTool can return the
    "customFormatter" string. The getBinPath function will resolve the path.
    
    Validate config also throw error when formatTool is set to custom but
    formatter's path is not provided in the alternateTools.
    
    [bug fix] tool existence check should be triggered under all condition
    regardless of whether user is using language server.
    
    Fix #3906
    
    Change-Id: I9d328c2c63064119d48cb42b8774e144c6281a36
    Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/717405
    Reviewed-by: Madeline Kalil <[email protected]>
    Auto-Submit: Hongxiang Jiang <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    h9jiang authored and gopherbot committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    6b7a2b6 View commit details
    Browse the repository at this point in the history
Loading