Than McIntosh has uploaded this change for review.
cmd: add a new goexperiment for redesigned code coverage
Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
for gating the use of the new code coverage design/implementation.
Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
---
A src/internal/goexperiment/exp_coverageredesign_off.go
A src/internal/goexperiment/exp_coverageredesign_on.go
M src/internal/goexperiment/flags.go
3 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/internal/goexperiment/exp_coverageredesign_off.go b/src/internal/goexperiment/exp_coverageredesign_off.go
new file mode 100644
index 0000000..95d3a6c
--- /dev/null
+++ b/src/internal/goexperiment/exp_coverageredesign_off.go
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build !goexperiment.coverageredesign
+// +build !goexperiment.coverageredesign
+
+package goexperiment
+
+const CoverageRedesign = false
+const CoverageRedesignInt = 0
diff --git a/src/internal/goexperiment/exp_coverageredesign_on.go b/src/internal/goexperiment/exp_coverageredesign_on.go
new file mode 100644
index 0000000..330a234
--- /dev/null
+++ b/src/internal/goexperiment/exp_coverageredesign_on.go
@@ -0,0 +1,9 @@
+// Code generated by mkconsts.go. DO NOT EDIT.
+
+//go:build goexperiment.coverageredesign
+// +build goexperiment.coverageredesign
+
+package goexperiment
+
+const CoverageRedesign = true
+const CoverageRedesignInt = 1
diff --git a/src/internal/goexperiment/flags.go b/src/internal/goexperiment/flags.go
index 9150493..7c62007 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -91,4 +91,8 @@
// has been broken out to its own experiment that is disabled
// by default.
HeapMinimum512KiB bool
+
+ // CoverageRedesign enables the new compiler-based code coverage
+ // tooling.
+ CoverageRedesign bool
}
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Michael Knyszek, Austin Clements.
Patch set 3:Run-TryBot +1
Attention is currently required from: Michael Knyszek, Austin Clements.
Patch set 4:Run-TryBot +1
Attention is currently required from: Michael Knyszek, Austin Clements.
Patch set 5:Run-TryBot +1
Attention is currently required from: Austin Clements, Michael Knyszek, Than McIntosh.
Patch set 5:Code-Review +2
2 comments:
Patchset:
Figure I should approve the easy ones, get them out of the way.
File src/internal/goexperiment/exp_coverageredesign_on.go:
Patch Set #5, Line 9: CoverageRedesignInt
I'm sure there's a perfectly good reason for this, just not sure what it is.
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Clements, David Chase, Michael Knyszek.
1 comment:
File src/internal/goexperiment/exp_coverageredesign_on.go:
Patch Set #5, Line 9: CoverageRedesignInt
I'm sure there's a perfectly good reason for this, just not sure what it is.
It's coming from here in the generator program:
Seems like a sort of "belt and suspenders" thing? E.g. maybe someone will need the constant in an integer context somehow, so might as well generate it?
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Clements, David Chase, Michael Knyszek, Than McIntosh.
Than McIntosh uploaded patch set #9 to this change.
cmd: add a new goexperiment for redesigned code coverage
Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
for gating the use of the new code coverage design/implementation.
Updates #51430.
Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
---
A src/internal/goexperiment/exp_coverageredesign_off.go
A src/internal/goexperiment/exp_coverageredesign_on.go
M src/internal/goexperiment/flags.go
3 files changed, 36 insertions(+), 0 deletions(-)
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Austin Clements, David Chase, Michael Knyszek.
Patch set 10:Run-TryBot +1
Attention is currently required from: Than McIntosh.
Patch set 14:Code-Review +2
2 comments:
Commit Message:
Patch Set #14, Line 9: coverageredesign
It always takes me several re-scans to lex this as "coverage redesign" but since it's temporary I'm not going to ask you to change it. :)
File src/internal/goexperiment/exp_coverageredesign_on.go:
Patch Set #5, Line 9: CoverageRedesignInt
It's coming from here in the generator program: […]
This is for when you need to construct another constant from this constant. E.g., those unfortunate something*(CoverageRedesignInt) + otherthing*(1-CoverRedesignInt) expressions. The only manipulation you can do to the bool constant in constant context is negate it. (This is one case where I wish we just had a ternary expression...)
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 20:Run-TryBot +1
Than McIntosh submitted this change.
14 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
cmd: add a new goexperiment for redesigned code coverage
Add a new "coverageredesign" GOEXPERIMENT (currently off by default),
for gating the use of the new code coverage design/implementation.
Updates #51430.
Change-Id: Ia61da869fcd0d61c6163f734e2fe5e3705f37a91
Reviewed-on: https://go-review.googlesource.com/c/go/+/395894
TryBot-Result: Gopher Robot <go...@golang.org>
Reviewed-by: David Chase <drc...@google.com>
Run-TryBot: Than McIntosh <th...@google.com>
Reviewed-by: Austin Clements <aus...@google.com>
---
A src/internal/goexperiment/exp_coverageredesign_off.go
A src/internal/goexperiment/exp_coverageredesign_on.go
M src/internal/goexperiment/flags.go
3 files changed, 41 insertions(+), 0 deletions(-)
index 20d9c2d..8faaf16 100644
--- a/src/internal/goexperiment/flags.go
+++ b/src/internal/goexperiment/flags.go
@@ -86,4 +86,8 @@
// has been broken out to its own experiment that is disabled
// by default.
HeapMinimum512KiB bool
+
+ // CoverageRedesign enables the new compiler-based code coverage
+ // tooling.
+ CoverageRedesign bool
}
To view, visit change 395894. To unsubscribe, or for help writing mail filters, visit settings.