Skip to content

incompatible_string_replace_count #11244

@zegl

Description

@zegl

This flag changes the behaviour of the count argument to string.replace() to work as according to the spec, and the Go and Python implementations of Starlark.

Flag: --incompatible_string_replace_count

Motivation: #9181

Added flag and changed behaviour: #9228

Migration: If your rules depend on the previous behaviour of string.replace() when count is negative (nothing is replaced), set count to 0 or None to achieve the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)incompatible-changeIncompatible/breaking change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions