Commit dc41a20
[5.1.0] cherrypick subpackages support (bazelbuild#14780)
* Split ConfiguredAttributeMapper into a new build target.
PiperOrigin-RevId: 411055066
* Part 1 of the Implementation for new 'subpackages()` built-in helper function.
Design proposal: https://docs.google.com/document/d/13UOT0GoQofxDW40ILzH2sWpUOmuYy6QZ7CUmhej9vgk/edit#
This CL modifies the globber infrastructure to support an additional mode of listing sub-directories.
* Add new Globber Operation enum allowing, Globber implementations to
discriminate between glob, glob w/directories and the future sub-packages
use-case.
* Modify UnixGlob to replace Predicate and bools with UnixGlobPathDiscriminator interface for:
a) Determining whether to traverse a sub-directory (previously was lambda)
b) function for determing what entries to include in the List<Path> produced by UnixGlob.globAsync.
These allow relatively simple re-use of the same logic for both subpackages and glob
4) Add a few tests for UnixGlob to ensure both cases continue to work as expected.
PiperOrigin-RevId: 421125424
* Part 2 Implementation for new 'subpackages()` built-in helper function.
Design proposal: https://docs.google.com/document/d/13UOT0GoQofxDW40ILzH2sWpUOmuYy6QZ7CUmhej9vgk/edit#
Overview:
Add StarlarkNativeModule 'subpackages' function with parameters that mirror glob()
PiperOrigin-RevId: 422652954
* Fix some typographical errors in the 'subpackages' docs.
PiperOrigin-RevId: 425942284
Co-authored-by: kkress <[email protected]>
Co-authored-by: Googler <[email protected]>1 parent a58ddea commit dc41a20
File tree
41 files changed
+1674
-471
lines changed- src
- main/java/com/google/devtools/build
- docgen/templates/be
- lib
- analysis
- includescanning
- packages
- query2
- runtime/commands
- skyframe
- starlarkbuildapi
- vfs
- skydoc/fakebuildapi
- test/java/com/google/devtools/build/lib
- analysis
- util
- packages
- rules
- apple
- config
- skyframe
- vfs
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+1674
-471
lines changedLines changed: 42 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
650 | 644 | | |
651 | | - | |
| 645 | + | |
652 | 646 | | |
653 | | - | |
| 647 | + | |
654 | 648 | | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
662 | 657 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
675 | 662 | | |
676 | | - | |
677 | | - | |
678 | | - | |
| 663 | + | |
679 | 664 | | |
680 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
681 | 688 | | |
682 | 689 | | |
683 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
350 | | - | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
13 | 39 | | |
14 | 40 | | |
15 | 41 | | |
16 | 42 | | |
17 | 43 | | |
18 | 44 | | |
| 45 | + | |
| 46 | + | |
19 | 47 | | |
| 48 | + | |
20 | 49 | | |
21 | 50 | | |
22 | 51 | | |
23 | 52 | | |
| 53 | + | |
| 54 | + | |
24 | 55 | | |
25 | 56 | | |
26 | 57 | | |
27 | | - | |
28 | 58 | | |
29 | 59 | | |
30 | 60 | | |
| |||
0 commit comments