Skip to content

[pull] main from bazel-contrib:main#328

Merged
pull[bot] merged 2 commits intogarymm:mainfrom
bazel-contrib:main
Jul 7, 2025
Merged

[pull] main from bazel-contrib:main#328
pull[bot] merged 2 commits intogarymm:mainfrom
bazel-contrib:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Jul 7, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.2)

Can you help keep this open source service alive? 💖 Please sponsor : )

rickeylev and others added 2 commits July 7, 2025 14:04
When parsing the local identifier segment of `<digit><letter>` the
parser would
give an error saying the letter was unexpected.

What was happening was `accept_digits()` consumed up to the first
non-digit, and
considered this success, which prevented calling `accept_alnum()` to
finish
the parsing.

To fix, only call `accept_alnum()`, then post-process the value to
normalize
an all-digit segment.

I'm guessing `accept_digits()` stopping at the first non-digit is WAI
because
it expects to parse e.g. "3.14b", where the caller handles subsequent
characters.

Along the way, some minor doc improvements to the parser code.

Fixes #3030
Adds a filegroup with all the files that came from the extracted wheel.

This has two benefits over using `whl_filegroup`: it avoids copying the
wheel
and makes the set of files directly visible to the analysis phase.

Some wheels are multiple gigabytes in size (e.g. torch, cuda,
tensorflow), so
avoiding the copy and archive processing saves a decent amount of time.

Knowing the specific files at analysis time is generally beneficial. The
particular case I ran into was the CC rules were unhappy with a
TreeArtifact
of header files because they couldn't enforce some check about who was
properly providing headers that were included (layering check?).

Another example is using the unused_inputs_list optimization, which
allows
an action to ignore inputs that aren't actually used. e.g. an action
could
take all the wheel's files as inputs, only care about the headers, and
then
tell bazel all the non-header files aren't relevant, and thus changes to
other files don't re-run the thing that only cares about headers.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Jul 7, 2025
@pull pull Bot added the ⤵️ pull label Jul 7, 2025
@pull pull Bot merged commit cdf4f55 into garymm:main Jul 7, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant