Commit 4c365e7
authored
cleanup: Set toolchain target_setting directly instead of via inline ternary (#1246)
The generated toolchain BUILD file is confusing to read because it
relies on a ternary expression in the BUILD file to set the
`target_settings` attribute. This makes debugging harder because, upon
first look, all the toolchains appear to have the version constraint
set. It's only upon closer inspection that you can see the 1-character
difference of "False" vs "True" embedded into the middle of a line
amongst other similar looking lines.
Also:
* Adds a bit of validation logic for the `set_python_version_constraint`
argument
because it's conceptually a boolean, but is passed as a string, so is
prone to
having an incorrect value passed.
* Documents the `set_python_version_constraint` arg, since it has a
particular range
of values it accepts.1 parent 7f6de72 commit 4c365e7
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
70 | | - | |
| 82 | + | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
75 | 87 | | |
76 | 88 | | |
77 | | - | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
82 | | - | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
0 commit comments