Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.4.0] Use debugPrint instead of str for fail arguments #19283

Merged
merged 2 commits into from
Aug 18, 2023

Commits on Aug 18, 2023

  1. Use debugPrint instead of str for fail arguments

    This allows non-hermetic information (such as Starlark `Location`s) to be included in `fail` messages without allowing access to it from Starlark. It also aligns the content of `fail` output with that of `print`.
    
    This change has very mild implications for backwards compatibility: it only affects the contents of `fail` messages, which aren't accessible from Starlark; `debugPrint`'s default implementation is `str` and no built-in Starlark type overrides it; if a type overrides `debugPrint`, it would usually contain at least as detailed information as `str`; `debugPrint` is a "Bazelism" that isn't governed by the Starlark spec.
    
    Work towards bazelbuild#17375
    
    Closes bazelbuild#18818.
    
    Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
    PiperOrigin-RevId: 557916312
    Change-Id: I8f202cd8530bcebb2d99f57745289b3992d03cac
    2 people authored and bazel-io committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    247ce0c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    67daa74 View commit details
    Browse the repository at this point in the history