Skip to content

Changing starlark build setting always discards the analysis cache. #13591

@uri-canva

Description

@uri-canva

Description of the problem / feature request:

Changing starlark build settings always discards the analysis cache. It would be nice to have a way of disabling that for certain build settings.

Feature requests: what underlying problem are you trying to solve with this feature?

When using starlark build settings that are limited to certain targets, it would be nice if the analysis cache could be maintained. Similar to --test_filter, for certain build settings, the values of the settings might be changed often, but would only cause a small number of additional configured targets to have to be cached. That's why --trim_test_configuration was introduced.

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

Create a starlark build setting, change its value, observe INFO: Build option --//tools/settings:your_setting has changed, discarding analysis cache.

What operating system are you running Bazel on?

> sw_vers
ProductName:	macOS
ProductVersion:	11.3.1
BuildVersion:	20E241

What's the output of bazel info release?

> bazel info release
INFO: Invocation ID: 781ccd26-b559-444f-976d-678b37d89b18
release 4.1.0- (@non-git)

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

From https://github.com/NixOS/nixpkgs/blob/0e3229d628b3a1c56cc9279c39e6a40720794773/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix.

Have you found anything relevant by searching the web?

#7466
#6011
#6842 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)team-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions