Skip to content

incompatible_restrict_named_params: make a number of params positional-only #8147

@c-parsons

Description

@c-parsons

This flag makes a number of parameters of Starlark builtin functions positional-only.

Flag: --incompatible_restrict_named_params

Motivation
The affected Starlark parameters were originally intended to be positional-only, but, due to an infrastructure bug, they were able to be specified by keyword for several releases.

An example case is that, today, one can specify:

len(x = [])

But len's one parameter should be positional-only.

See #5010 for original bug.

Migration
We will incorporate automatic migration using buildifier for affected parameters. Migration can also be achieved manually by specifying affected parameters positionally (look to the Bazel Starlark builtins docs for positional ordering, when in doubt!)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions