Commit bde1c23
committed
interpreter|build: Use typed_kwargs for build_target(dependencies)
What is basically impossible is to handle `SubprojectHolder`, because
it's not a true holder but an interpreter object. Well, impossible
without changing SubprojectHolder into a true holder, because it's
avoiding the circular import becomes extremely convoluted otherwise, and
refactoring is difficult because the held object is itself an
Interpreter. It's a rather complex problem to solve gracefully. I've
punted to avoid the complexity, it does mean that the error message is
somewhat less exact.
I don't think this is actually a huge problem because we've really
guided people away from using `subproject()` and to instead use
dependency fallbacks, which don't have this problem to begin with.
This removes validation from the build layer, and puts it in
interpreter. For code sharing reasons this means that
`internal_dependency` also gets more fine grained error messages.
The test case for this has been modified to use the `testcase
expect_error` construct, and thus has been moved to the common tests
directory. It's also been extended to cover both the library case, which
gives coverage for the `extra_types` in `KwargInfo`1 parent f3d9a71 commit bde1c23
10 files changed
Lines changed: 22 additions & 36 deletions
File tree
- mesonbuild
- interpreter
- test cases
- common/287 invalid dependency arguments
- subprojects/sub
- failing/124 subproject object as a dependency
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
1287 | 1287 | | |
1288 | 1288 | | |
1289 | 1289 | | |
1290 | | - | |
1291 | | - | |
| 1290 | + | |
1292 | 1291 | | |
1293 | 1292 | | |
1294 | 1293 | | |
| |||
1418 | 1417 | | |
1419 | 1418 | | |
1420 | 1419 | | |
1421 | | - | |
1422 | | - | |
| 1420 | + | |
1423 | 1421 | | |
1424 | 1422 | | |
1425 | 1423 | | |
| |||
1447 | 1445 | | |
1448 | 1446 | | |
1449 | 1447 | | |
1450 | | - | |
| 1448 | + | |
1451 | 1449 | | |
1452 | 1450 | | |
1453 | 1451 | | |
1454 | 1452 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | 1453 | | |
1474 | 1454 | | |
1475 | 1455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3559 | 3559 | | |
3560 | 3560 | | |
3561 | 3561 | | |
3562 | | - | |
| 3562 | + | |
3563 | 3563 | | |
3564 | 3564 | | |
3565 | 3565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
| |||
721 | 724 | | |
722 | 725 | | |
723 | 726 | | |
| 727 | + | |
724 | 728 | | |
725 | 729 | | |
726 | 730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
This file was deleted.
0 commit comments