[go] cmd/go: emit coverage for selected build dependencies

5 views
Skip to first unread message

Harjoth Khara (Gerrit)

unread,
Jul 16, 2026, 2:06:04 AM (6 days ago) Jul 16
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Message from Harjoth Khara

Set Ready For Review

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: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
Gerrit-Change-Number: 801381
Gerrit-PatchSet: 1
Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
Gerrit-Comment-Date: Thu, 16 Jul 2026 06:06:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Sean Liao (Gerrit)

unread,
Jul 19, 2026, 11:37:34 AM (2 days ago) Jul 19
to Harjoth Khara, goph...@pubsubhelper.golang.org, Michael Matloob, golang-co...@googlegroups.com
Attention needed from Harjoth Khara and Michael Matloob

Sean Liao added 1 comment

File src/cmd/go/internal/load/pkg.go
Line 3584, Patchset 1 (Latest): if !haveMatch && (!includeMain || p.Name != "main") {
Sean Liao . unresolved

I think this is too many negatives to read.
Instead, move the cmode declaration and the main override block at 3627 before this check.

Open in Gerrit

Related details

Attention is currently required from:
  • Harjoth Khara
  • Michael Matloob
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: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
    Gerrit-Change-Number: 801381
    Gerrit-PatchSet: 1
    Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
    Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
    Gerrit-CC: Sean Liao <se...@liao.dev>
    Gerrit-Attention: Michael Matloob <mat...@golang.org>
    Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
    Gerrit-Comment-Date: Sun, 19 Jul 2026 15:37:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Harjoth Khara (Gerrit)

    unread,
    Jul 19, 2026, 1:57:19 PM (2 days ago) Jul 19
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Harjoth Khara and Michael Matloob

    Harjoth Khara uploaded new patchset

    Harjoth Khara uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harjoth Khara
    • Michael Matloob
    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: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
    Gerrit-Change-Number: 801381
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy

    Harjoth Khara (Gerrit)

    unread,
    Jul 19, 2026, 1:58:16 PM (2 days ago) Jul 19
    to goph...@pubsubhelper.golang.org, Michael Matloob, golang-co...@googlegroups.com
    Attention needed from Michael Matloob and Sean Liao

    Harjoth Khara added 1 comment

    File src/cmd/go/internal/load/pkg.go
    Line 3584, Patchset 2 (Latest): // detector to be invoked before it has been initialized. Note
    Harjoth Khara . resolved

    Thanks, that does read better. Moved cmode and the main override above the check so it's just if !haveMatch now.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Matloob
    • Sean Liao
    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: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
      Gerrit-Change-Number: 801381
      Gerrit-PatchSet: 2
      Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Sean Liao <se...@liao.dev>
      Gerrit-Comment-Date: Sun, 19 Jul 2026 17:58:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Sean Liao (Gerrit)

      unread,
      Jul 19, 2026, 2:24:02 PM (2 days ago) Jul 19
      to Harjoth Khara, goph...@pubsubhelper.golang.org, Michael Matloob, golang-co...@googlegroups.com
      Attention needed from Harjoth Khara and Michael Matloob

      Sean Liao voted

      Code-Review+2
      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harjoth Khara
      • Michael Matloob
      Submit Requirements:
      • requirement 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: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
      Gerrit-Change-Number: 801381
      Gerrit-PatchSet: 2
      Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
      Gerrit-Comment-Date: Sun, 19 Jul 2026 18:23:53 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Sean Liao (Gerrit)

      unread,
      Jul 19, 2026, 2:53:15 PM (2 days ago) Jul 19
      to Harjoth Khara, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Matloob, golang-co...@googlegroups.com
      Attention needed from Harjoth Khara and Michael Matloob

      Sean Liao voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harjoth Khara
      • Michael Matloob
      Submit Requirements:
      • requirement 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: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
      Gerrit-Change-Number: 801381
      Gerrit-PatchSet: 2
      Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
      Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
      Gerrit-Reviewer: Sean Liao <se...@liao.dev>
      Gerrit-Attention: Michael Matloob <mat...@golang.org>
      Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
      Gerrit-Comment-Date: Sun, 19 Jul 2026 18:53:07 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michael Matloob (Gerrit)

      unread,
      Jul 20, 2026, 12:29:51 PM (yesterday) Jul 20
      to Harjoth Khara, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
      Attention needed from Harjoth Khara

      Michael Matloob voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harjoth Khara
      Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement 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: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
        Gerrit-Change-Number: 801381
        Gerrit-PatchSet: 2
        Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-Reviewer: Sean Liao <se...@liao.dev>
        Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Comment-Date: Mon, 20 Jul 2026 16:29:43 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Michael Matloob (Gerrit)

        unread,
        Jul 20, 2026, 12:31:24 PM (yesterday) Jul 20
        to Harjoth Khara, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
        Attention needed from Harjoth Khara

        Michael Matloob voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harjoth Khara
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement 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: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
        Gerrit-Change-Number: 801381
        Gerrit-PatchSet: 2
        Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-Reviewer: Michael Matloob <mat...@google.com>
        Gerrit-Comment-Date: Mon, 20 Jul 2026 16:31:19 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harjoth Khara (Gerrit)

        unread,
        Jul 20, 2026, 1:06:45 PM (yesterday) Jul 20
        to goph...@pubsubhelper.golang.org, Michael Matloob, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
        Attention needed from Michael Matloob

        Message from Harjoth Khara

        Thanks Michael. Happy to add someone, who would you suggest?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Michael Matloob
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement 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: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
        Gerrit-Change-Number: 801381
        Gerrit-PatchSet: 2
        Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-Reviewer: Michael Matloob <mat...@google.com>
        Gerrit-Reviewer: Sean Liao <se...@liao.dev>
        Gerrit-Attention: Michael Matloob <mat...@golang.org>
        Gerrit-Comment-Date: Mon, 20 Jul 2026 17:06:39 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Michael Matloob (Gerrit)

        unread,
        Jul 20, 2026, 2:22:40 PM (yesterday) Jul 20
        to Harjoth Khara, goph...@pubsubhelper.golang.org, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
        Attention needed from Harjoth Khara and Michael Matloob

        Michael Matloob added 1 comment

        Patchset-level comments
        File-level comment, Patchset 2 (Latest):
        Michael Matloob . resolved

        There's no need to add someone. We have a list of CLs that need an extra +1 (go.dev/s/needs-review) and have a rotation that looks at it and adds +1s.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harjoth Khara
        • Michael Matloob
        Submit Requirements:
        • requirement satisfiedCode-Review
        • requirement 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: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
        Gerrit-Change-Number: 801381
        Gerrit-PatchSet: 2
        Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
        Gerrit-Reviewer: Michael Matloob <mat...@google.com>
        Gerrit-Reviewer: Sean Liao <se...@liao.dev>
        Gerrit-Attention: Michael Matloob <mat...@golang.org>
        Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
        Gerrit-Comment-Date: Mon, 20 Jul 2026 18:22:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Carlos Amedee (Gerrit)

        unread,
        5:37 PM (5 hours ago) 5:37 PM
        to Harjoth Khara, goph...@pubsubhelper.golang.org, Michael Matloob, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
        Attention needed from Harjoth Khara

        Carlos Amedee voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harjoth Khara
        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: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
          Gerrit-Change-Number: 801381
          Gerrit-PatchSet: 2
          Gerrit-Owner: Harjoth Khara <harjot...@gmail.com>
          Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
          Gerrit-Reviewer: Michael Matloob <mat...@google.com>
          Gerrit-Reviewer: Sean Liao <se...@liao.dev>
          Gerrit-Attention: Harjoth Khara <harjot...@gmail.com>
          Gerrit-Comment-Date: Tue, 21 Jul 2026 21:37:30 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Sean Liao (Gerrit)

          unread,
          6:03 PM (5 hours ago) 6:03 PM
          to Harjoth Khara, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Carlos Amedee, Michael Matloob, Michael Matloob, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

          Sean Liao submitted the change

          Change information

          Commit message:
          cmd/go: emit coverage for selected build dependencies

          When -coverpkg excludes the main package, SelectCoverPackages returns
          before the existing regonly path can add the main package's coverage
          registration hook. Allow unmatched main packages through that gate so
          covered dependencies can emit metadata and counters.

          Add a script regression for building with coverage limited to an
          external dependency, and align the fixture's required module with its
          imported package for deterministic cold-cache resolution.

          Fixes #80307
          Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
          Reviewed-by: Michael Matloob <mat...@google.com>
          Reviewed-by: Michael Matloob <mat...@golang.org>
          Reviewed-by: Sean Liao <se...@liao.dev>
          Reviewed-by: Carlos Amedee <car...@golang.org>
          Files:
          • M src/cmd/go/internal/load/pkg.go
          • M src/cmd/go/testdata/script/cover_build_pkg_select.txt
          Change size: M
          Delta: 2 files changed, 47 insertions(+), 24 deletions(-)
          Branch: refs/heads/master
          Submit Requirements:
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I8867cd40069a897a52a89085acbfc743f531aec5
          Gerrit-Change-Number: 801381
          Gerrit-PatchSet: 3
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages