Commit 4247c20
Traverse symlinks to directories while collecting a TreeArtifactValue.
As explained in #20418, when a tree artifact contains a symlink to a directory, it is collected as a single TreeFileArtifact with DirectoryArtifactValue metadata. With this change, the symlink is followed and the directory expanded into its contents, which is more incrementally correct and removes a special case that tree artifact consumers would otherwise have to be aware of.
This also addresses #21171, which is due to the metadata for the directory contents not being available when building without the bytes, causing the input Merkle tree builder to fail. (While I could have fixed this by falling back to reading the directory contents from the filesystem, I prefer to abide by the principle that input metadata should be collected before execution; source directories are the other case where this isn't true, which I also regard as a bug.)
Fixes #20418.
Fixes #21171.
PiperOrigin-RevId: 608389141
Change-Id: I956f3f8a4b1bfd279091e179d1cba3cdd0e5019b1 parent 9eb3b0a commit 4247c20
8 files changed
Lines changed: 350 additions & 75 deletions
File tree
- src
- main/java/com/google/devtools/build/lib/skyframe
- test/java/com/google/devtools/build/lib
- actions
- exec
- remote
- skyframe
Lines changed: 7 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 304 | + | |
312 | 305 | | |
313 | 306 | | |
314 | 307 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
Lines changed: 58 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
490 | | - | |
491 | | - | |
| 491 | + | |
| 492 | + | |
492 | 493 | | |
493 | | - | |
494 | | - | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
495 | 499 | | |
496 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
497 | 511 | | |
498 | 512 | | |
499 | 513 | | |
500 | 514 | | |
501 | 515 | | |
502 | 516 | | |
503 | | - | |
| 517 | + | |
| 518 | + | |
504 | 519 | | |
505 | 520 | | |
506 | 521 | | |
| |||
519 | 534 | | |
520 | 535 | | |
521 | 536 | | |
522 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
523 | 543 | | |
524 | 544 | | |
525 | 545 | | |
526 | 546 | | |
527 | 547 | | |
528 | 548 | | |
529 | 549 | | |
530 | | - | |
| 550 | + | |
| 551 | + | |
531 | 552 | | |
532 | 553 | | |
533 | 554 | | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | 555 | | |
539 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
540 | 583 | | |
541 | 584 | | |
542 | | - | |
| 585 | + | |
543 | 586 | | |
544 | 587 | | |
545 | 588 | | |
546 | 589 | | |
547 | 590 | | |
548 | | - | |
| 591 | + | |
| 592 | + | |
549 | 593 | | |
550 | 594 | | |
551 | 595 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
1658 | | - | |
| 1658 | + | |
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
978 | | - | |
| 978 | + | |
979 | 979 | | |
980 | 980 | | |
981 | 981 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
679 | 709 | | |
Lines changed: 91 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
407 | 462 | | |
408 | 463 | | |
409 | 464 | | |
| |||
448 | 503 | | |
449 | 504 | | |
450 | 505 | | |
451 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
452 | 509 | | |
453 | 510 | | |
454 | 511 | | |
| |||
477 | 534 | | |
478 | 535 | | |
479 | 536 | | |
480 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
481 | 540 | | |
482 | 541 | | |
483 | 542 | | |
| |||
852 | 911 | | |
853 | 912 | | |
854 | 913 | | |
855 | | - | |
856 | 914 | | |
857 | | - | |
| 915 | + | |
858 | 916 | | |
859 | 917 | | |
860 | | - | |
| 918 | + | |
861 | 919 | | |
862 | 920 | | |
863 | | - | |
864 | | - | |
865 | | - | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
866 | 926 | | |
867 | 927 | | |
868 | 928 | | |
| |||
874 | 934 | | |
875 | 935 | | |
876 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
877 | 960 | | |
878 | 961 | | |
879 | 962 | | |
| |||
0 commit comments