golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.69k stars 17.49k forks source link

internal/goexperiment: remove CoverageRedesign some time in 1.23 #55953

Open thanm opened 1 year ago

thanm commented 1 year ago

This is a tracking issue to remove the "CoverageRedesign" GOEXPERIMENT some time in the Go 1.21 release; at that point hopefully any remaining (potential) bugs/issues with the new coverage design will be ironed out, and we will no longer need the GOEXPERIMENT=nocoverageredesign fallback.

@thanm

AlekSi commented 1 year ago

I guess the title should be updated too

thanm commented 1 year ago

Thanks. Updated.

thanm commented 1 year ago

Removing the experiment didn't make the 1.21 release, there are still some bugfix CLs not yet submitted (e.g. 495446, 495447, and 495452). Once those go in I should be in a better position to get rid of the experiment.

tombrown52 commented 10 months ago

@thanm Is this likely to be removed in 1.22, or bumped to 1.23? (I tried to find links to the issues you included, 495446, 495447, and 495452, but was unsuccessful)

thanm commented 10 months ago

Hi @tombrown52,

Thanks for the note. That last comment I posted was a bit cryptic, sorry about that. "495446, 495447, and 495452" are Gerrit CLs, not issues. These CLs have now been merged, and bugs they were intended to address have been closed. More details with links:

CLs 495446 and 495447 are for issues #18909 and #24570.

CL 495452 is for issue #58770.

My intent was to have these fixed early in this cycle, but for a variety of reasons this didn't happen. As a result we're going to bump the deletion of GOEXPERIMENT=coverageredesign until the next release; with less than a month to go before the freeze, it is better to wait until early in the next cycle.

tombrown52 commented 10 months ago

@thanm Thanks for the update!

thanm commented 9 months ago

Bumping milestone to 1.23

Feggah commented 6 months ago

I have generated packages in my monorepo that I don't want to include in the coverage report. With GOEXPERIMENT=nocoverageredesign they are not included.

If this is removed, how can I remove specific packages from the coverage? For example, I would like to ignore all packages within the paths:

Is it possible to do that configuration in the go test command?

begelundmuller commented 6 months ago

Hi, I'm not able to tell if this issue has been resolved or is tracked elsewhere, but if we don't set GOEXPERIMENT=nocoverageredesign, we get the following errors for two packages in our repository:

github.com/rilldata/rill/proto/gen/rill/admin/v1: open /tmp/go-build1717652986/b205/covmeta.efd544d54abd57024320e5b09e7fbb7333ec3c9e2c058a3d351094eaca3dd4d6: no such file or directory
github.com/rilldata/rill/proto/gen/rill/runtime/v1: open /tmp/go-build1717652986/b324/covmeta.067b3bf4a6ecbbbcd442d5d3dfcb816dbf6bc1aee18591e902bf98c6b115f2e7: no such file or directory

I believe the error originates from here: https://github.com/golang/go/blob/b5a64ba62eafe5dee13562091ca03aef6cac87b6/src/cmd/go/internal/test/test.go#L1411

It seems there is some edge case in the coverage redesign where BuildActionCoverMetaFile looks for a cover meta file that doesn't exist.

thanm commented 6 months ago

@begelundmuller thanks for the report. The problem you posted about is being tracked in https://github.com/golang/go/issues/65653.

ChrisHines commented 3 months ago

Please don't remove GOEXPERIMENT=nocoverageredesign until https://github.com/golang/go/issues/65570 is resolved.

thanm commented 2 months ago

I have a fix out for #65570, but at this point it is too late to be removing this experiment in 1.23, bumping to 1.24.

AlekSi commented 4 weeks ago

@thanm Probably, the title should be updated too