commit | 4fd6cfd4fac9f9ccf9a597effb26fa7534bff266 | [log] [tgz] |
---|---|---|
author | Googler <brandjon@google.com> | Tue May 23 06:06:31 2023 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue May 23 06:08:14 2023 -0700 |
tree | 99cf873fda5b90e85a62ce16b0f800e6999fafa3 | |
parent | c9c28a9b4324f1eebbbe2e23f471e0880fabd559 [diff] |
Add flag for lexer to reject non-ASCII strings The toggle is added to FileOptions, where syntax-based switches for the interpreter go. FileOptions is now threaded through to the Lexer from the public entrypoints (StarlarkFile#parse, Expression#parse); previously it only went to the Resolver. Both raw characters and octal escapes are checked. Raw characters are processed in two separate code paths since there's a fast-path for scanning strings without escapes. Added additional assertions to existing test cases for octal escapes. Added two new test cases covering non-ascii raw data and non-ascii octal escapes respectively. FileOptions is statefully manipulated in the tests; I consider this less evil than trying to thread another parameter through the existing test helpers. (When reading the test cases, mind Java escapes vs Starlark ones.) PiperOrigin-RevId: 534397406 Change-Id: I5a2e57963fdecd606114deff0c19b38ba8fb738c
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md