bazelbuild / examples

Examples for Bazel
http://bazel.build
Apache License 2.0
840 stars 515 forks source link

[Bazel CI]Error in glob: glob pattern '*.test.ts' didn't match anything #517

Open sgowroji opened 1 month ago

sgowroji commented 1 month ago

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4189#019274a0-aa31-4dd2-bd82-081459cc9161

Platform: MacOS

Logs:

 ERROR: Traceback (most recent call last):
    File "/Users/buildkite/builds/bk-macos-pln3-49ko/bazel-org-repo-root/examples/frontend/react/src/BUILD.bazel", line 36, column 16, in <toplevel>
        srcs = glob(TEST_PATTERNS),
Error in glob: glob pattern '*.test.ts' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
(06:20:45) ERROR: package contains errors: react/src
(06:20:49) ERROR: package contains errors: react/src: Traceback (most recent call last):
    File "/Users/buildkite/builds/bk-macos-pln3-49ko/bazel-org-repo-root/examples/frontend/react/src/BUILD.bazel", line 36, column 16, in <toplevel>
        srcs = glob(TEST_PATTERNS),
Error in glob: glob pattern '*.test.ts' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
(06:20:49) WARNING: Target pattern parsing failed.
(06:20:49) ERROR: Skipping '...': Error evaluating '...': error loading package 'react/src': Package 'react/src' contains errors
(06:20:49) ERROR: Error evaluating '...': error loading package 'react/src': Package 'react/src' contains errors

Culprit: https://github.com/bazelbuild/bazel/issues/8195

Steps:

 git clone https://github.com/bazelbuild/examples
git reset ea103d50c1322c53d8a42e94af8c3e1a427f898b  --hard
export USE_BAZEL_VERSION=788b6080f54c6ca5093526023dfd9b12b90403f8
bazel build ... 

CC Greenteam @fweikert