rules_fuzzing icon indicating copy to clipboard operation
rules_fuzzing copied to clipboard

Consider adding support for the bzlmod module system

Open stefanbucur opened this issue 3 years ago • 1 comments

We should figure out to to expose dependencies like Honggfuzz, and the OSSFuzz repository rules.

See more at https://docs.bazel.build/versions/main/bzlmod.html

stefanbucur avatar Jan 03 '22 16:01 stefanbucur

Packaging up rules_fuzzing that provides a functional cc_fuzz_test wouldn't be much work. I would be happy to provide guidance if somebody wants to try it.

Getting java_fuzz_test to work requires more work. I am of course working on packaging Jazzer up for bzlmod, but that is blocked on rules_kotlin being available as a module. There is also a Bazel bug that I haven't been able to fix in time for Bazel 5.0.0 and that would definitely complicate making java_fuzz_test work with modules.

fmeum avatar Jan 03 '22 16:01 fmeum

Bazel has started warning:

WARNING: --enable_bzlmod is set, but no MODULE.bazel file was found at the workspace root. Bazel will create an empty
MODULE.bazel file. Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. For more
details, please refer to https://github.com/bazelbuild/bazel/issues/18958.

While it's technically possible to mix WORKSPACE and MODULE.bazel until WORKSPACE is support is completely removed from Bazel in a few releases, the fact that rules_fuzzing requires calling rules_fuzzing_dependencies() in WORKSPACE causes conflicts during linking if MODULE.bazel specifies the same dependency (which prompted me to write something here because a project I'm working on ran into this issue).

melver avatar Jan 29 '24 15:01 melver

https://github.com/bazelbuild/rules_fuzzing/pull/242 is going to add support.

fmeum avatar Jan 29 '24 15:01 fmeum