[tools] go/analysis/passes/stdversion: suppress synctest warning

6 views
Skip to first unread message

Madeline Kalil (Gerrit)

unread,
Dec 19, 2025, 2:03:08 PM (5 days ago) Dec 19
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Madeline Kalil has uploaded the change for review

Commit message

go/analysis/passes/stdversion: suppress synctest warning

WIP
Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520

Change diff

diff --git a/go/analysis/passes/stdversion/stdversion.go b/go/analysis/passes/stdversion/stdversion.go
index 3147219..418b917 100644
--- a/go/analysis/passes/stdversion/stdversion.go
+++ b/go/analysis/passes/stdversion/stdversion.go
@@ -99,6 +99,16 @@
if obj, ok := pass.TypesInfo.Uses[n]; ok && obj.Pkg() != nil {
disallowed := disallowedSymbols(obj.Pkg(), fileVersion)
if minVersion, ok := disallowed[origin(obj)]; ok {
+ if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
+ // Special case: some files that use synctest have
+ // complex build tags that ensure that the synctest
+ // package is available but do not necessarily imply
+ // that the go version is go1.25. We suppress the
+ // error to avoid false positives in this case by
+ // relaxing the check to go1.24.
+ // See golang/go#75367.
+ break
+ }
noun := "module"
if fileVersion != pkgVersion {
noun = "file"

Change information

Files:
  • M go/analysis/passes/stdversion/stdversion.go
Change size: S
Delta: 1 file changed, 10 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
Gerrit-Change-Number: 731461
Gerrit-PatchSet: 1
Gerrit-Owner: Madeline Kalil <mka...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Madeline Kalil (Gerrit)

unread,
Dec 19, 2025, 2:03:23 PM (5 days ago) Dec 19
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Madeline Kalil uploaded new patchset

Madeline Kalil uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
Gerrit-Change-Number: 731461
Gerrit-PatchSet: 2
Gerrit-Owner: Madeline Kalil <mka...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
Dec 19, 2025, 2:27:55 PM (5 days ago) Dec 19
to Madeline Kalil, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Madeline Kalil

Alan Donovan added 2 comments

File go/analysis/passes/stdversion/stdversion.go
Line 102, Patchset 2 (Latest): if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
Alan Donovan . unresolved

I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
Line 7, Patchset 2 (Latest):-min_go_command=go1.24
Alan Donovan . unresolved

You may need -max_go_command=go1.25 as IIRC the synctest GOEXPERIMENT is no more, since it is in the mainline.

(Unfortunately I couldn't reproduce the issue we saw on your machine whereby the go command only returns ReleaseTags up to go1.23.)

Open in Gerrit

Related details

Attention is currently required from:
  • Madeline Kalil
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 2
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 19:27:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 1:47:06 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Madeline Kalil

    Madeline Kalil uploaded new patchset

    Madeline Kalil uploaded patch set #3 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Madeline Kalil
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 3
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 2:02:26 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, Alan Donovan, golang-co...@googlegroups.com
    Attention needed from Alan Donovan

    Madeline Kalil voted and added 2 comments

    Votes added by Madeline Kalil

    Commit-Queue+1

    2 comments

    File go/analysis/passes/stdversion/stdversion.go
    Line 102, Patchset 2: if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
    Alan Donovan . unresolved

    I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

    Madeline Kalil

    Done, although now we get completions from synctest in files with version >= go1.24, is that the behavior we want? Suppressing a potentially false positive error makes sense to me, but suggesting a package that might not actually be available seems less desirable.

    File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
    Line 7, Patchset 2:-min_go_command=go1.24
    Alan Donovan . resolved

    You may need -max_go_command=go1.25 as IIRC the synctest GOEXPERIMENT is no more, since it is in the mainline.

    (Unfortunately I couldn't reproduce the issue we saw on your machine whereby the go command only returns ReleaseTags up to go1.23.)

    Madeline Kalil

    Thanks for trying to reproduce the issue. Unfortunately it's preventing me from running this test locally - the marker test framework just skips it.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 3
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 19:02:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Alan Donovan <adon...@google.com>
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 2:12:38 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Alan Donovan and Madeline Kalil

    Madeline Kalil uploaded new patchset

    Madeline Kalil uploaded patch set #4 to this change.
    Following approvals got outdated and were removed:
    • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Madeline Kalil
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 4
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 2:12:54 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com
    Attention needed from Alan Donovan

    Madeline Kalil voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 4
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 19:12:51 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Alan Donovan (Gerrit)

    unread,
    Dec 22, 2025, 2:24:25 PM (2 days ago) Dec 22
    to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
    Attention needed from Madeline Kalil

    Alan Donovan added 3 comments

    File go/analysis/passes/stdversion/stdversion.go
    Line 102, Patchset 2: if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
    Alan Donovan . unresolved

    I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

    Madeline Kalil

    Done, although now we get completions from synctest in files with version >= go1.24, is that the behavior we want? Suppressing a potentially false positive error makes sense to me, but suggesting a package that might not actually be available seems less desirable.

    Alan Donovan

    See my comment at toonew.go:27.

    File internal/typesinternal/toonew.go
    Line 27, Patchset 3: if pkg.Path() == "testing/synctest" && versions.AtLeast("go1.24", version) {
    Alan Donovan . unresolved

    These operands are the wrong way around.

    Tip: In general, a function `op(x, y)` representing an asymmetric binary relation such as less, before, after, has prefix, contains, etc, should be read as `x op y`. This is the same parameter order as a method such as `x.contains(y)`.

    Line 27, Patchset 3: if pkg.Path() == "testing/synctest" && versions.AtLeast("go1.24", version) {
    Alan Donovan . unresolved

    I expect there will be more items like this in future, so let's add a general introduction, and then specific detail. For example:

    ```
    // Some symbols are accessible before their release but
    // only with specific build tags unknown to us here.
    // Avoid false positives in such cases.
    if pkg.Path() == "testing/synctest" && versions.AtLeast(version, "go1.24") {
    continue // requires go1.24 && goexperiment.synctest || go1.25
    }
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Madeline Kalil
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 3
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Madeline Kalil <mka...@google.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 19:24:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Madeline Kalil <mka...@google.com>
    Comment-In-Reply-To: Alan Donovan <adon...@google.com>
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 2:37:19 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Madeline Kalil

    Madeline Kalil uploaded new patchset

    Madeline Kalil uploaded patch set #5 to this change.
    Following approvals got outdated and were removed:
    • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Madeline Kalil
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 5
    unsatisfied_requirement
    open
    diffy

    Madeline Kalil (Gerrit)

    unread,
    Dec 22, 2025, 2:37:31 PM (2 days ago) Dec 22
    to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com
    Attention needed from Alan Donovan

    Madeline Kalil voted and added 3 comments

    Votes added by Madeline Kalil

    Commit-Queue+1

    3 comments

    File go/analysis/passes/stdversion/stdversion.go
    Line 102, Patchset 2: if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
    Alan Donovan . unresolved

    I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

    Madeline Kalil

    Done, although now we get completions from synctest in files with version >= go1.24, is that the behavior we want? Suppressing a potentially false positive error makes sense to me, but suggesting a package that might not actually be available seems less desirable.

    Alan Donovan

    See my comment at toonew.go:27.

    Madeline Kalil

    We are now getting synctest completions for files with go1.24 that don't have the special build tag set -- is that okay?

    File internal/typesinternal/toonew.go
    Line 27, Patchset 3: if pkg.Path() == "testing/synctest" && versions.AtLeast("go1.24", version) {
    Alan Donovan . resolved

    These operands are the wrong way around.

    Tip: In general, a function `op(x, y)` representing an asymmetric binary relation such as less, before, after, has prefix, contains, etc, should be read as `x op y`. This is the same parameter order as a method such as `x.contains(y)`.

    Madeline Kalil

    Done

    Line 27, Patchset 3: if pkg.Path() == "testing/synctest" && versions.AtLeast("go1.24", version) {
    Alan Donovan . resolved

    I expect there will be more items like this in future, so let's add a general introduction, and then specific detail. For example:

    ```
    // Some symbols are accessible before their release but
    // only with specific build tags unknown to us here.
    // Avoid false positives in such cases.
    if pkg.Path() == "testing/synctest" && versions.AtLeast(version, "go1.24") {
    continue // requires go1.24 && goexperiment.synctest || go1.25
    }
    ```
    Madeline Kalil

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: tools
    Gerrit-Branch: master
    Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
    Gerrit-Change-Number: 731461
    Gerrit-PatchSet: 5
    Gerrit-Owner: Madeline Kalil <mka...@google.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Comment-Date: Mon, 22 Dec 2025 19:37:25 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    open
    diffy

    Alan Donovan (Gerrit)

    unread,
    Dec 22, 2025, 3:08:43 PM (2 days ago) Dec 22
    to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
    Attention needed from Madeline Kalil

    Alan Donovan added 2 comments

    File go/analysis/passes/stdversion/stdversion.go
    Line 102, Patchset 2: if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
    Alan Donovan . unresolved

    I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

    Madeline Kalil

    Done, although now we get completions from synctest in files with version >= go1.24, is that the behavior we want? Suppressing a potentially false positive error makes sense to me, but suggesting a package that might not actually be available seems less desirable.

    Alan Donovan

    See my comment at toonew.go:27.

    Madeline Kalil

    We are now getting synctest completions for files with go1.24 that don't have the special build tag set -- is that okay?

    Alan Donovan

    Ah, sorry, I had thought the operand-order issue was the cause, but I now see that the problem is intrinsic to using (effectively) a boolean result from TooNewStdSymbols: there's no way to express "don't know" without hurting either an optimistic client (such as completion) or a pessimistic one such as this analyzer.

    I think this logic does ultimately belong in TooNew; the question is how. One possibility is for TooNew to return some kind of tri-state value so that callers can get one of three answers: ok, not ok, or don't know. That requires changing the map type rather awkwardly. Another approach is to pass an additional boolean to TooNew that determines what to do in the unknown cases. But since we'll want to cherrypick this change to the release branch, for now I think we should minimize the delta by doing the check in the caller (as in PS1) and leaving a TODO to push it down into TooNew at a later date.

    File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
    Line 4, Patchset 5 (Latest):
    Alan Donovan . unresolved

    Comment that the synctest experiment was removed in go1.26, hence the need for a maximum version too.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Madeline Kalil
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: tools
      Gerrit-Branch: master
      Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
      Gerrit-Change-Number: 731461
      Gerrit-PatchSet: 5
      Gerrit-Owner: Madeline Kalil <mka...@google.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
      Gerrit-Attention: Madeline Kalil <mka...@google.com>
      Gerrit-Comment-Date: Mon, 22 Dec 2025 20:08:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Madeline Kalil (Gerrit)

      unread,
      Dec 22, 2025, 5:37:46 PM (2 days ago) Dec 22
      to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
      Attention needed from Madeline Kalil

      Madeline Kalil uploaded new patchset

      Madeline Kalil uploaded patch set #6 to this change.
      Following approvals got outdated and were removed:
      • TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Madeline Kalil
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: tools
        Gerrit-Branch: master
        Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
        Gerrit-Change-Number: 731461
        Gerrit-PatchSet: 6
        unsatisfied_requirement
        open
        diffy

        Madeline Kalil (Gerrit)

        unread,
        Dec 22, 2025, 5:38:33 PM (2 days ago) Dec 22
        to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com
        Attention needed from Alan Donovan

        Madeline Kalil voted and added 2 comments

        Votes added by Madeline Kalil

        Commit-Queue+1

        2 comments

        File go/analysis/passes/stdversion/stdversion.go
        Line 102, Patchset 2: if obj.Pkg().Path() == "testing/synctest" && fileVersion == "go1.24" {
        Alan Donovan . resolved

        I think this want to be implemented in TooNewStdSymbols so that Completion also benefits from it.

        Madeline Kalil

        Done, although now we get completions from synctest in files with version >= go1.24, is that the behavior we want? Suppressing a potentially false positive error makes sense to me, but suggesting a package that might not actually be available seems less desirable.

        Alan Donovan

        See my comment at toonew.go:27.

        Madeline Kalil

        We are now getting synctest completions for files with go1.24 that don't have the special build tag set -- is that okay?

        Alan Donovan

        Ah, sorry, I had thought the operand-order issue was the cause, but I now see that the problem is intrinsic to using (effectively) a boolean result from TooNewStdSymbols: there's no way to express "don't know" without hurting either an optimistic client (such as completion) or a pessimistic one such as this analyzer.

        I think this logic does ultimately belong in TooNew; the question is how. One possibility is for TooNew to return some kind of tri-state value so that callers can get one of three answers: ok, not ok, or don't know. That requires changing the map type rather awkwardly. Another approach is to pass an additional boolean to TooNew that determines what to do in the unknown cases. But since we'll want to cherrypick this change to the release branch, for now I think we should minimize the delta by doing the check in the caller (as in PS1) and leaving a TODO to push it down into TooNew at a later date.

        Madeline Kalil

        Thanks, makes sense. We no longer have a completion suggestion for the symbols in synctest, although it still suggests the synctest package itself so this must be a different aspect of the completion logic.

        File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
        Line 4, Patchset 5:
        Alan Donovan . resolved

        Comment that the synctest experiment was removed in go1.26, hence the need for a maximum version too.

        Madeline Kalil

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alan Donovan
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: tools
          Gerrit-Branch: master
          Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
          Gerrit-Change-Number: 731461
          Gerrit-PatchSet: 6
          Gerrit-Owner: Madeline Kalil <mka...@google.com>
          Gerrit-Reviewer: Alan Donovan <adon...@google.com>
          Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
          Gerrit-Attention: Alan Donovan <adon...@google.com>
          Gerrit-Comment-Date: Mon, 22 Dec 2025 22:38:30 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Alan Donovan (Gerrit)

          unread,
          Dec 22, 2025, 5:49:50 PM (2 days ago) Dec 22
          to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
          Attention needed from Madeline Kalil

          Alan Donovan added 1 comment

          File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
          Line 9, Patchset 6 (Latest):// Set max to go1.25 since the synctest experiment was removed in go1.26.
          Alan Donovan . unresolved

          I'm pretty sure this comment will terminate flag parsing. It's unfortunate that the marker test doesn't report this, but I suspect it's why tests are failing on 1.26.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Madeline Kalil
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: tools
            Gerrit-Branch: master
            Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
            Gerrit-Change-Number: 731461
            Gerrit-PatchSet: 6
            Gerrit-Owner: Madeline Kalil <mka...@google.com>
            Gerrit-Reviewer: Alan Donovan <adon...@google.com>
            Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
            Gerrit-Attention: Madeline Kalil <mka...@google.com>
            Gerrit-Comment-Date: Mon, 22 Dec 2025 22:49:46 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            unsatisfied_requirement
            open
            diffy

            Alan Donovan (Gerrit)

            unread,
            Dec 22, 2025, 5:57:23 PM (2 days ago) Dec 22
            to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
            Attention needed from Madeline Kalil

            Alan Donovan added 1 comment

            File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
            Line 9, Patchset 6 (Latest):// Set max to go1.25 since the synctest experiment was removed in go1.26.
            Alan Donovan . unresolved

            I'm pretty sure this comment will terminate flag parsing. It's unfortunate that the marker test doesn't report this, but I suspect it's why tests are failing on 1.26.

            Alan Donovan
            If you replace this FlagSet.Parse call in marker_test.go:
            ```
            if err := test.flagSet().Parse(test.flags); err != nil {
            ```
            by this:
            ```
            // Parse flags after loading files, as they may have been set by the "flags" file.
            set := test.flagSet()
            if err := set.Parse(test.flags); err != nil {
            return nil, fmt.Errorf("parsing flags: %v", err)
            }
            if set.NArg() > 0 {
            return nil, fmt.Errorf("surplus arguments after flags: %q", set.Args())
            }
            ```
            then we won't fall into this trap again.
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Madeline Kalil
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: tools
            Gerrit-Branch: master
            Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
            Gerrit-Change-Number: 731461
            Gerrit-PatchSet: 6
            Gerrit-Owner: Madeline Kalil <mka...@google.com>
            Gerrit-Reviewer: Alan Donovan <adon...@google.com>
            Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
            Gerrit-Attention: Madeline Kalil <mka...@google.com>
            Gerrit-Comment-Date: Mon, 22 Dec 2025 22:57:19 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Alan Donovan <adon...@google.com>
            unsatisfied_requirement
            open
            diffy

            Madeline Kalil (Gerrit)

            unread,
            Dec 22, 2025, 6:02:34 PM (2 days ago) Dec 22
            to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
            Attention needed from Madeline Kalil

            Madeline Kalil uploaded new patchset

            Madeline Kalil uploaded patch set #7 to this change.
            Following approvals got outdated and were removed:
            • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Madeline Kalil
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: newpatchset
            Gerrit-Project: tools
            Gerrit-Branch: master
            Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
            Gerrit-Change-Number: 731461
            Gerrit-PatchSet: 7
            unsatisfied_requirement
            open
            diffy

            Madeline Kalil (Gerrit)

            unread,
            Dec 22, 2025, 6:03:13 PM (2 days ago) Dec 22
            to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com
            Attention needed from Alan Donovan

            Madeline Kalil voted and added 1 comment

            Votes added by Madeline Kalil

            Commit-Queue+1

            1 comment

            File gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
            Line 9, Patchset 6:// Set max to go1.25 since the synctest experiment was removed in go1.26.
            Alan Donovan . resolved

            I'm pretty sure this comment will terminate flag parsing. It's unfortunate that the marker test doesn't report this, but I suspect it's why tests are failing on 1.26.

            Alan Donovan
            If you replace this FlagSet.Parse call in marker_test.go:
            ```
            if err := test.flagSet().Parse(test.flags); err != nil {
            ```
            by this:
            ```
            // Parse flags after loading files, as they may have been set by the "flags" file.
            set := test.flagSet()
            if err := set.Parse(test.flags); err != nil {
            return nil, fmt.Errorf("parsing flags: %v", err)
            }
            if set.NArg() > 0 {
            return nil, fmt.Errorf("surplus arguments after flags: %q", set.Args())
            }
            ```
            then we won't fall into this trap again.
            Madeline Kalil

            Thanks!

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Alan Donovan
            Submit Requirements:
              • requirement is not satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
              Gerrit-Change-Number: 731461
              Gerrit-PatchSet: 7
              Gerrit-Owner: Madeline Kalil <mka...@google.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
              Gerrit-Attention: Alan Donovan <adon...@google.com>
              Gerrit-Comment-Date: Mon, 22 Dec 2025 23:03:09 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Alan Donovan <adon...@google.com>
              unsatisfied_requirement
              satisfied_requirement
              open
              diffy

              Alan Donovan (Gerrit)

              unread,
              Dec 22, 2025, 6:08:18 PM (2 days ago) Dec 22
              to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
              Attention needed from Madeline Kalil

              Alan Donovan voted and added 1 comment

              Votes added by Alan Donovan

              Code-Review+2

              1 comment

              File go/analysis/passes/stdversion/stdversion.go
              Line 113, Patchset 7 (Latest): noun := "module"
              Alan Donovan . unresolved
              Let's use the comment form I suggested earlier, since it explains both the pattern and the specifics:

              ```
              // Some symbols are accessible before their release but
              // only with specific build tags unknown to us here.
              // Avoid false positives in such cases.
              if obj.Pkg().Path() == "testing/synctest" && versions.AtLeast(fileVersion, "go1.24") {
              break // requires go1.24 && goexperiment.synctest || go1.25
              }
              ```
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Madeline Kalil
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
              Gerrit-Change-Number: 731461
              Gerrit-PatchSet: 7
              Gerrit-Owner: Madeline Kalil <mka...@google.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
              Gerrit-Attention: Madeline Kalil <mka...@google.com>
              Gerrit-Comment-Date: Mon, 22 Dec 2025 23:08:15 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Madeline Kalil (Gerrit)

              unread,
              Dec 22, 2025, 6:14:36 PM (2 days ago) Dec 22
              to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
              Attention needed from Madeline Kalil

              Madeline Kalil uploaded new patchset

              Madeline Kalil uploaded patch set #8 to this change.
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Madeline Kalil
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement is not satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: newpatchset
              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
              Gerrit-Change-Number: 731461
              Gerrit-PatchSet: 8
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Madeline Kalil (Gerrit)

              unread,
              Dec 22, 2025, 6:14:58 PM (2 days ago) Dec 22
              to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com

              Madeline Kalil voted and added 1 comment

              Votes added by Madeline Kalil

              Auto-Submit+1
              Commit-Queue+1

              1 comment

              File go/analysis/passes/stdversion/stdversion.go
              Line 113, Patchset 7: noun := "module"
              Alan Donovan . resolved
              Let's use the comment form I suggested earlier, since it explains both the pattern and the specifics:
              ```
              // Some symbols are accessible before their release but
              // only with specific build tags unknown to us here.
              // Avoid false positives in such cases.
              if obj.Pkg().Path() == "testing/synctest" && versions.AtLeast(fileVersion, "go1.24") {
              break // requires go1.24 && goexperiment.synctest || go1.25
              }
              ```
              Madeline Kalil

              Done

              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
              Gerrit-Change-Number: 731461
              Gerrit-PatchSet: 8
              Gerrit-Owner: Madeline Kalil <mka...@google.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
              Gerrit-Comment-Date: Mon, 22 Dec 2025 23:14:54 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Alan Donovan <adon...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Alan Donovan (Gerrit)

              unread,
              Dec 22, 2025, 10:02:14 PM (2 days ago) Dec 22
              to Madeline Kalil, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
              Attention needed from Madeline Kalil

              Alan Donovan voted and added 1 comment

              Votes added by Alan Donovan

              Code-Review+2

              1 comment

              Patchset-level comments
              File-level comment, Patchset 8 (Latest):
              Alan Donovan . resolved

              The test failure is spurious; you can bypass the trybot.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Madeline Kalil
              Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement satisfiedReview-Enforcement
              • requirement is not satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: tools
              Gerrit-Branch: master
              Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
              Gerrit-Change-Number: 731461
              Gerrit-PatchSet: 8
              Gerrit-Owner: Madeline Kalil <mka...@google.com>
              Gerrit-Reviewer: Alan Donovan <adon...@google.com>
              Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
              Gerrit-Attention: Madeline Kalil <mka...@google.com>
              Gerrit-Comment-Date: Tue, 23 Dec 2025 03:02:10 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Madeline Kalil (Gerrit)

              unread,
              Dec 23, 2025, 11:16:28 AM (yesterday) Dec 23
              to goph...@pubsubhelper.golang.org, Go LUCI, Alan Donovan, golang-co...@googlegroups.com

              Madeline Kalil voted TryBot-Bypass+1

              TryBot-Bypass+1
              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
                • requirement satisfiedCode-Review
                • requirement satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                • requirement satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: tools
                Gerrit-Branch: master
                Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
                Gerrit-Change-Number: 731461
                Gerrit-PatchSet: 8
                Gerrit-Owner: Madeline Kalil <mka...@google.com>
                Gerrit-Reviewer: Alan Donovan <adon...@google.com>
                Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
                Gerrit-Comment-Date: Tue, 23 Dec 2025 16:16:25 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Madeline Kalil (Gerrit)

                unread,
                Dec 23, 2025, 11:16:47 AM (yesterday) Dec 23
                to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Alan Donovan, golang-co...@googlegroups.com

                Madeline Kalil submitted the change

                Change information

                Commit message:
                go/analysis/passes/stdversion: suppress synctest warning

                Some files that use synctest have complex build tags
                that ensure that the synctest package is available
                but do not necessarily imply that the go version is
                go 1.25. We suppress the error to avoid false
                positives in this case by relaxing the check
                to go1.24.

                Fixes golang/go#75367
                Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
                Reviewed-by: Alan Donovan <adon...@google.com>
                Auto-Submit: Madeline Kalil <mka...@google.com>
                TryBot-Bypass: Madeline Kalil <mka...@google.com>
                Files:
                • M go/analysis/passes/stdversion/stdversion.go
                • M gopls/internal/test/marker/marker_test.go
                • A gopls/internal/test/marker/testdata/diagnostics/stdversion_synctest.txt
                • M internal/mcp/conformance_test.go
                Change size: S
                Delta: 4 files changed, 40 insertions(+), 4 deletions(-)
                Branch: refs/heads/master
                Submit Requirements:
                • requirement satisfiedCode-Review: +2 by Alan Donovan
                • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI, TryBot-Bypass+1 by Madeline Kalil
                Open in Gerrit
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: merged
                Gerrit-Project: tools
                Gerrit-Branch: master
                Gerrit-Change-Id: Ifd586eba2dd63e7945d8a85bc36d704a3672e520
                Gerrit-Change-Number: 731461
                Gerrit-PatchSet: 9
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages