Commit fc65564
committed
fix(workspace): [workspace.build] applies to a member reached as a dependency
Found by asking the completeness question the feature invites and not by a
failure: does `[workspace.build]` reach a member that is compiled as ANOTHER
member's `path` dependency? Measured, it did not.
mcpp build -p appb appb -DWS_FLAG=1 -std=c++26
liba -std=c++26 <- the sibling
Inheritance ran only where the command's own manifest is loaded, so a workspace
where members depend on each other — the ordinary shape, not an exotic one —
got the flags on one package and not on the others, in the same command.
`[workspace.package] standard` hid it. The standard is imposed graph-wide from
the root for BMI-compatibility reasons, so it reached the sibling anyway; the
gap only became reachable once a `[build]` key was inheritable too.
Two halves, applied where each one's consumer reads it:
- `[workspace.package]` at the dependency LOAD site, because a member may
legally omit `package.version` when the workspace supplies it, and the
parser would otherwise refuse it for a field the workspace does provide —
naming the member's manifest rather than the table that answers.
- `[workspace.build]` in `makePackageRoot`, the one funnel both
dependency-assembly sites go through, and the point at which the include
directories are captured from the manifest. A later mutation would reach
the flags and silently not the include dirs.
`is_workspace_member` asks the workspace's own `members` list rather than "is
this path inside the tree": a vendored copy or an example living under the
workspace is not a member, and a member's flags are exactly what it must not
acquire. 321 asserts both directions in one fixture, because a fix that
inherited to every `path` dependency would pass the positive alone.
`inherit_workspace_config` is now the composition of the two halves, so the
three call sites cannot drift.1 parent 7735387 commit fc65564
3 files changed
Lines changed: 178 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4443 | 4443 | | |
4444 | 4444 | | |
4445 | 4445 | | |
4446 | | - | |
| 4446 | + | |
4447 | 4447 | | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
4448 | 4478 | | |
4449 | 4479 | | |
4450 | 4480 | | |
| |||
5442 | 5472 | | |
5443 | 5473 | | |
5444 | 5474 | | |
5445 | | - | |
| 5475 | + | |
| 5476 | + | |
| 5477 | + | |
| 5478 | + | |
| 5479 | + | |
| 5480 | + | |
| 5481 | + | |
| 5482 | + | |
| 5483 | + | |
| 5484 | + | |
| 5485 | + | |
| 5486 | + | |
| 5487 | + | |
| 5488 | + | |
| 5489 | + | |
| 5490 | + | |
| 5491 | + | |
| 5492 | + | |
| 5493 | + | |
| 5494 | + | |
5446 | 5495 | | |
5447 | 5496 | | |
5448 | 5497 | | |
5449 | 5498 | | |
5450 | 5499 | | |
5451 | 5500 | | |
| 5501 | + | |
| 5502 | + | |
| 5503 | + | |
| 5504 | + | |
| 5505 | + | |
| 5506 | + | |
| 5507 | + | |
| 5508 | + | |
| 5509 | + | |
| 5510 | + | |
| 5511 | + | |
5452 | 5512 | | |
5453 | 5513 | | |
5454 | 5514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
131 | 184 | | |
132 | 185 | | |
133 | 186 | | |
| |||
158 | 211 | | |
159 | 212 | | |
160 | 213 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
189 | 221 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
195 | 242 | | |
196 | 243 | | |
197 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
152 | 188 | | |
0 commit comments