question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"bazel clean" failure when Starlark options present in "build" lines in .bazelrc

See original GitHub issue

Description of the problem / feature request:

When I use a label-typed Bazel option on a build line in a .bazelrc file, Bazel fails with an error:

# .bazelrc file
build --//fuzzing:cc_engine=//fuzzing/engines:libfuzzer
$ bazel clean
ERROR: Unrecognized arguments: --//fuzzing:cc_engine=//fuzzing/engines:libfuzzer

This is quite problematic for us, because we offer this option in a library, and developers are expected to be able to override the option in their own workspaces.

Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

$ git clone git@github.com:bazelbuild/rules_fuzzing.git
$ cd rules_fuzzing
$ [edit the .bazelrc file and add the "build --//fuzzing:cc_engine=//fuzzing/engines:libfuzzer" snippet]
$ bazel clean

What operating system are you running Bazel on?

Debian

What’s the output of bazel info release?

release 3.7.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Commands and Options | Bazel
These options control Bazel's error-checking and/or warnings. ... or cc_binary build rules are placed on the compiler command line after these options.
Read more >
Command-Line Reference - Bazel
Canonicalizes a list of bazel options. clean, Removes output files and optionally stops the server. coverage, Generates code coverage report for specified test ......
Read more >
bazelrc - Google Git
For projects which use TensorFlow as part of a Bazel build process, putting ... Default options should come above this line. # Allow...
Read more >
README.md - Aspect's Bazel Documentation
This project extends Bazel with build rules for Haskell. Get started building your own ... You can learn more about Bazel's command line...
Read more >
Bazel 0.18.0 release candidate 6 is available for testing
New bazelrc file list. - Adds --incompatible_expand_directories to automatically expand directories in skylark command lines. Design doc:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found