Commit 9d63ae2
authored
fix(script): Remove name sanitiztion outside what is strictly required (#16120)
### What does this PR try to resolve?
Note that we are currently inconsistent in that `test` gets sanitized
but nothing else in `sysroot`.
We reviewed what gets sanitized in the Cargo team meeting and found none
of these really apply to cargo scripts except conflicting with artifact
dirs.
For conflicting with artifact dirs, making this an error now gives us
the best compatibility story.
A user can workaround this by overriding `package.name`.
Our paths forward include:
- Leave it as-is or at least improve the error message for this case
- Make it so we don't need the error message
- Add back sanitizating the name
Ideally, we make it so we don't need the error message.
The ground work was laid out for this in #16086.
The next step is to move the conflict error from manifest parsing to
compilation so we can check whether target-dir and build-dir overlap to
error.
There are unknowns with this,
including whether the usability is good enough for making this error
conditional on the target-dir and build-dir overlapping.
We may even want to wait until we change the default build-dir.
### How to test and review this PR?File tree
2 files changed
+76
-28
lines changed- src/cargo/util/toml
- tests/testsuite/script
2 files changed
+76
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 59 | + | |
79 | 60 | | |
80 | 61 | | |
81 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
| 677 | + | |
| 678 | + | |
678 | 679 | | |
679 | | - | |
680 | | - | |
681 | | - | |
| 680 | + | |
682 | 681 | | |
683 | | - | |
| 682 | + | |
684 | 683 | | |
685 | 684 | | |
686 | | - | |
| 685 | + | |
687 | 686 | | |
688 | 687 | | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
693 | | - | |
| 692 | + | |
694 | 693 | | |
695 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
696 | 763 | | |
697 | 764 | | |
698 | 765 | | |
| |||
0 commit comments