Skip to content

incompatible_disallow_old_octal_notation #8059

@laurentlb

Description

@laurentlb

Historically, octal numbers in Starlark were written 0123 (like in Python 2 and C). Two years ago, we added support for the 0o123 notation which is more explicit. Now is time to remove the old notation.

- var = 0123
+ var = 0o123

We expect most users won't even notice the change:

  • Octal numbers are very rarely used (one use-case is for Unix prmissions, e.g. permissions = 0o755).
  • Buildifier is already updating numbers to the new style

Flag added: Bazel 0.26
Flag flipped: Bazel 0.27 (expected)

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)incompatible-changeIncompatible/breaking change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions