golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.86k stars 741 forks source link

Setting go.showWelcome to false does not disable showing the welcome #3319

Closed sfiggins closed 5 months ago

sfiggins commented 5 months ago

After setting go.showWelcome to false in User or Workspace settings, the go welcome page is still shown.

Noted in version 0.39.1.

I believe that this is because getConfiguration returns a configuration object rather than a value, so the check on the setting always returns true.

I think this could work:

        if (!extensionInfo.isInCloudIDE && vscode.workspace.getConfiguration('go').get('showWelcome')) {
            showGoWelcomePage();
        }

Though it might be easier to add a test on this if it used getGoConfig to retrieve the configuration. The check could also be moved to shouldShowGoWelcome.

gopherbot commented 5 months ago

Change https://go.dev/cl/577075 mentions this issue: extension/src/welcome: fix 'go.showWelcome' setting interpretation

hyangah commented 5 months ago

Thanks @sfiggins! Sent a change and added a test. Thanks for the good suggestion!

gopherbot commented 5 months ago

Change https://go.dev/cl/580420 mentions this issue: extension/src/welcome: fix 'go.showWelcome' setting interpretation

exodustx0 commented 5 months ago

It should be noted that the implemented fix didn't just fix and move the if-condition, it also changed its logic: previously, if isInCloudIDE, it would ignore go.showWelcome and not show, whereas now, if isInCloudIDE, it would ignore go.showWelcome and show.

gopherbot commented 5 months ago

Change https://go.dev/cl/581118 mentions this issue: extension/src/welcome: readd the fix for go.showWelcome handling

hyangah commented 5 months ago

Thanks @exodustx0 That's obviously a bug. v0.41.4 released now should address the issue. Let us know if you are still seeing the issue.