Skip to content

Validate that action mnemonics are string literals - makes allowing custom mnemonics safer #23575

@sitaktif

Description

@sitaktif

Description of the feature request:

Customizing mnemonic for actions is a useful feature that improves the output for users and also allows build engineers to use features such as --modify_execution_info more effectively.

However, to avoid issues related to an explosion of mnemonics (which may cause problems) it was suggested that a safeguard should be added to Bazel to ensure that mnemonics are literals. This prevents users from creating a large number of actions named eg. "some-name-" + i in a loop or list comprehension.

Related issue: bazelbuild/bazel-skylib#491

Which category does this issue belong to?

Starlark Integration

What underlying problem are you trying to solve with this feature?

Trying to improve safety.

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

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

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions