rules_go icon indicating copy to clipboard operation
rules_go copied to clipboard

nogo not populating Go version in analysis pass

Open zakcutner opened this issue 1 year ago • 1 comments

What version of rules_go are you using?

0.46.0

What version of gazelle are you using?

0.36.0

What version of Bazel are you using?

7.1.1

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

macOS (arm64)

Any other potentially useful information about your toolchain?

No

What did you do?

I ran nogo with Go version 1.22.

What did you expect to see?

No linting errors.

What did you see instead?

Linting errors from the loopclosure linter.

The loopclosure linter detects the Go version and disables itself for Go 1.22 and later. For this, it checks pass.TypesInfo.FileVersions, but this field does not appear to be populated by nogo.

zakcutner avatar Apr 19 '24 17:04 zakcutner

same here 👍

nogo(
    name = "nogo",
    config = ":nogo.json",
    visibility = ["//visibility:public"],
    deps = TOOLS_NOGO + [],
)

excluding via the json file or removing loopclosure from the TOOLS_NOGO results in

ERROR: /Users/loeffel/go/src/github.com/loeffel-io/ls-lint/internal/linter/BUILD.bazel:17:8: output 'internal/linter/linter_test.internal.facts' was not created
ERROR: /Users/loeffel/go/src/github.com/loeffel-io/ls-lint/internal/linter/BUILD.bazel:17:8: Running nogo on //internal/linter:linter_test failed: not all outputs were created or valid

loeffel-io avatar Nov 19 '24 10:11 loeffel-io