Skip to content

Passing --@rules_rust//:error_format=json triggers a full rebuild #3604

@rdelfin

Description

@rdelfin

Adding and/or removing the flag --@rules_rust//:error_format=json seems to trigger a rebuild of all rust dependencies. You can see an example of it here: https://github.com/rdelfin/min_repro_rules_rust

Simply run:

bazel build //:main

Followed by

bazel build --@rules_rust//:error_format=json //:main

And you'll see the second command rebuild all of tokio anew.

This seems like a bug as the flag should not affect cached artifacts, given it just provides a distinct error output format. This is an issue as this flag is a common way of integrating displaying errors in some IDEs manually or otherwise for scripting error checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions