Remove the goexperiment.synctest build tag

Signed-off-by: Ganesh Vernekar <ganesh.vernekar@reddit.com>
This commit is contained in:
Ganesh Vernekar 2026-02-11 13:53:10 -08:00
parent 64b97bf488
commit 0d59a920bc
4 changed files with 1 additions and 64 deletions

View file

@ -241,8 +241,7 @@ jobs:
- name: Lint with slicelabels
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
# goexperiment.synctest to ensure we don't miss files that depend on it.
args: --verbose --build-tags=slicelabels,goexperiment.synctest
args: --verbose --build-tags=slicelabels
version: ${{ steps.golangci-lint-version.outputs.version }}
- name: Lint with dedupelabels
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0

View file

@ -1,29 +0,0 @@
// Copyright The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !goexperiment.synctest && !go1.25
package synctest
import (
"testing"
)
func Test(t *testing.T, _ func(t *testing.T)) {
t.Skip("goexperiment.synctest is not enabled")
}
func Wait() {
// It isn't meant to be called outside of Test().
panic("goexperiment.synctest is not enabled")
}

View file

@ -1,31 +0,0 @@
// Copyright The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build goexperiment.synctest && !go1.25
package synctest
import (
"testing"
"testing/synctest"
)
func Test(t *testing.T, f func(t *testing.T)) {
synctest.Run(func() {
f(t)
})
}
func Wait() {
synctest.Wait()
}

View file

@ -11,8 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build go1.25
package synctest
import (