bazelbuild / rules_fuzzing

Bazel Starlark extensions for defining fuzz tests in Bazel projects
Apache License 2.0
81 stars 19 forks source link

Failures in the test suite running on latest Bazel #206

Open stefanbucur opened 2 years ago

stefanbucur commented 2 years ago

See for example https://github.com/bazelbuild/rules_fuzzing/actions/runs/2522403386:

ERROR: Traceback (most recent call last):
    File "/home/runner/work/rules_fuzzing/rules_fuzzing/WORKSPACE", line 35, column 12, in <toplevel>
        jazzer_init()
    File "/home/runner/.cache/bazel/_bazel_runner/fe6cb6e248ce6cff4727b846eff77c1f/external/jazzer/init.bzl", line 26, column 24, in jazzer_init
        kotlin_repositories()
    File "/home/runner/.cache/bazel/_bazel_runner/fe6cb6e248ce6cff4727b846eff77c1f/external/io_bazel_rules_kotlin/src/main/starlark/core/repositories/initialize.bzl", line 96, column 21, in kotlin_repositories
        rules_repository(
Error in repository_rule: invalid repository name '': must start with a letter and contain only letters, digits, '.', '-', or '_'
ERROR: error loading package '': Encountered error while reading extension file 'setup.bzl': no such package '@io_bazel_stardoc//': error loading package 'external': Could not load //external package

Seems to be related to a Jazzer dependency on Kotlin. CC @fmeum for visibility.

fmeum commented 2 years ago

Caused by https://github.com/bazelbuild/bazel/issues/15667, will need to wait for that to be resolved in a rules_kotlin release.

stefanbucur commented 1 year ago

https://github.com/bazelbuild/bazel/issues/15667 seems to be fixed now? FWIW, rules_fuzzing still fails when running on the latest Bazel.

fmeum commented 1 year ago

I would have to update the rules_kotlin pin. In the meantime, Jazzer has been heavily refactored and is now available as a prebuilt jar on Maven. I am planning to make use of this new architecture to simplify the way Jazzer is loaded and run by rules_fuzzing.

liuyangc3 commented 1 year ago

Came to same issue

bazelisk run --config=jazzer //:NativeFuzzTest_run
ERROR: Traceback (most recent call last):
    File "/server/jazzer_test/fuzzing/WORKSPACE", line 55, column 12, in <toplevel>
        jazzer_init()
    File "/home/user/.cache/bazel/_bazel_user/ce25cb582fa08943403630574741128d/external/jazzer/init.bzl", line 26, column 24, in jazzer_init
        kotlin_repositories()
    File "/home/user/.cache/bazel/_bazel_user/ce25cb582fa08943403630574741128d/external/io_bazel_rules_kotlin/src/main/starlark/core/repositories/initialize.bzl", line 96, column 21, in kotlin_repositories
        rules_repository(
Error in repository_rule: invalid user-provided repo name '': valid names may contain only A-Z, a-z, 0-9, '-', '_', '.', and must start with a letter
ERROR: Error computing the main repository mapping: error loading package 'external': Package 'external' contains errors