Skip to content

No Compiler Optimization Details for some files #4013

@Kentzo

Description

@Kentzo

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.26.1 darwin/arm64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.21.1
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.115.0
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.52.2
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
## Environment

GOBIN: /Users/kentzo/.local/bin
toolsGopath: 
gopath: /Users/kentzo/.local/share/go
GOROOT: /private/var/db/brew/homebrew/Cellar/go/1.26.1/libexec
PATH: /opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/sbin/:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Applications/PyCharm CE.app/Contents/MacOS:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/sbin:/Users/kentzo/.local/bin

## Tools

	go:	/opt/homebrew/bin/go: go version go1.26.1 darwin/arm64

	gotests:	/Users/kentzo/.local/bin/gotests	(version: v1.6.0 built with go: go1.26.1)
	impl:	/Users/kentzo/.local/bin/impl	(version: v1.4.0 built with go: go1.26.1)
	goplay:	/Users/kentzo/.local/bin/goplay	(version: v1.0.0 built with go: go1.26.1)
	dlv:	/Users/kentzo/.local/bin/dlv	(version: v1.26.1 built with go: go1.26.1)
	golangci-lint-v2:	/Users/kentzo/.local/bin/golangci-lint-v2	(version: v2.11.4 built with go: go1.26.1)
	gopls:	/Users/kentzo/.local/bin/gopls	(version: v0.21.1 built with go: go1.26.1)

## Go env

Workspace Folder (CoreDNS): /Users/kentzo/Documents/Hobby/coredns-srp

	AR='ar'
	CC='cc'
	CGO_CFLAGS='-O2 -g'
	CGO_CPPFLAGS=''
	CGO_CXXFLAGS='-O2 -g'
	CGO_ENABLED='1'
	CGO_FFLAGS='-O2 -g'
	CGO_LDFLAGS='-O2 -g'
	CXX='c++'
	GCCGO='gccgo'
	GO111MODULE=''
	GOARCH='arm64'
	GOARM64='v8.0'
	GOAUTH='netrc'
	GOBIN='/Users/kentzo/.local/bin'
	GOCACHE='/Users/kentzo/.cache/go/build'
	GOCACHEPROG=''
	GODEBUG=''
	GOENV='/Users/kentzo/.config/go/env'
	GOEXE=''
	GOEXPERIMENT=''
	GOFIPS140='off'
	GOFLAGS=''
	GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/g6/8p_5qmqj14xfwphqsx_6g4mh0000gn/T/go-build2543851414=/tmp/go-build -gno-record-gcc-switches -fno-common'
	GOHOSTARCH='arm64'
	GOHOSTOS='darwin'
	GOINSECURE=''
	GOMOD='/dev/null'
	GOMODCACHE='/Users/kentzo/.cache/go/mod'
	GONOPROXY=''
	GONOSUMDB=''
	GOOS='darwin'
	GOPATH='/Users/kentzo/.local/share/go'
	GOPRIVATE=''
	GOPROXY='https://proxy.golang.org,direct'
	GOROOT='/private/var/db/brew/homebrew/Cellar/go/1.26.1/libexec'
	GOSUMDB='sum.golang.org'
	GOTELEMETRY='local'
	GOTELEMETRYDIR='/Users/kentzo/Library/Application Support/go/telemetry'
	GOTMPDIR=''
	GOTOOLCHAIN='local+path'
	GOTOOLDIR='/private/var/db/brew/homebrew/Cellar/go/1.26.1/libexec/pkg/tool/darwin_arm64'
	GOVCS=''
	GOVERSION='go1.26.1'
	GOWORK=''
	PKG_CONFIG='pkg-config'

Share the Go related settings you have added/edited

User:

{
    "go.survey.prompt": false,
    "go.showWelcome": false,
    "go.inlayHints.ignoredError": true,
    "go.inlayHints.constantValues": true,
    "go.editorContextMenuCommands": {
        "compilerDetails": true
    },
    "go.inlayHints.compositeLiteralFields": true,
    "go.inlayHints.parameterNames": true,
    "go.coverOnSingleTest": true,
    "go.coverOnSingleTestFile": true,
    "go.testExplorer.showDynamicSubtestsInEditor": true,
}

Folder:

{
    "go.buildFlags": [
        "-v"
    ],
    "go.lintOnSave": "package",
    "go.lintTool": "golangci-lint-v2",
    "gopls": {
        "ui.semanticTokens": true,
    },
    "go.lintFlags": [
        "--path-mode=abs",
        "--enable=godox",
        "--enable=nilerr",
        "--enable=nilnil",
        "--enable=prealloc",
        "--enable=wastedassign",
        "--disable=godoclint"
    ],
    "go.toolsEnvVars": {
        "GOTOOLCHAIN": "local+path"
    },
    "go.testFlags": [
        "-race",
        "-shuffle=on"
    ]
}

Describe the bug

When I use "Go: Toggle compiler optimization details", some files in the package get both inline and escape hints while others get nothing.
As long as a given package can be build, I expect optimization details hints to be provided for all its files.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions