Commit b253568
committed
feat(contract-psl,mongo-family)!: reject legacy @relation(name:) — disambiguate with inverse:/through: J.field
Complete the clean break begun in S1 (rejecting fields:/references:): the
positional @relation("x") and the named @relation(name: "x") forms are now
rejected as input in both the SQL and Mongo families, with a guiding
PSL_LEGACY_RELATION_NAME diagnostic pointing at the directional replacements.
Disambiguation is by pointing only: inverse: <fkField> for a 1:N back-relation
with multiple candidates, through: Junction.field for an ambiguous many-to-many.
The SQL family already had both pointer forms (S2/S3); the Mongo family gains
inverse: parsing and matching here (it has no junction-based M:N recognition, so
only the 1:N disambiguator applies). The relation-name string never reached the
emitted contract, so the name:->inverse:/through: migration of the test schemas
and the relation-backrelation-list parity fixture lowers byte-identically
(fixtures:check clean).
The legacy-name plumbing (relationName on ParsedRelationAttribute,
FkRelationMetadata, and the backrelation candidates) is removed in both families.
The two ambiguity diagnostics now recommend inverse:/through: instead of
@relation(name:).
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>1 parent 4593c85 commit b253568
13 files changed
Lines changed: 264 additions & 176 deletions
File tree
- packages
- 2-mongo-family/2-authoring/contract-psl
- src
- test
- 2-sql
- 2-authoring/contract-psl
- src
- test
- 9-family/test/psl-contract-infer/print-psl
- test/integration/test/authoring/parity/relation-backrelation-list
Lines changed: 41 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
| |||
987 | 986 | | |
988 | 987 | | |
989 | 988 | | |
990 | | - | |
| 989 | + | |
991 | 990 | | |
992 | 991 | | |
993 | 992 | | |
| |||
1039 | 1038 | | |
1040 | 1039 | | |
1041 | 1040 | | |
1042 | | - | |
| 1041 | + | |
1043 | 1042 | | |
1044 | 1043 | | |
1045 | 1044 | | |
| |||
1066 | 1065 | | |
1067 | 1066 | | |
1068 | 1067 | | |
1069 | | - | |
1070 | 1068 | | |
1071 | 1069 | | |
1072 | 1070 | | |
| |||
1176 | 1174 | | |
1177 | 1175 | | |
1178 | 1176 | | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | 1177 | | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1200 | 1217 | | |
1201 | 1218 | | |
1202 | | - | |
1203 | 1219 | | |
1204 | 1220 | | |
1205 | 1221 | | |
| |||
Lines changed: 23 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
132 | | - | |
133 | 137 | | |
134 | 138 | | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
149 | | - | |
| 159 | + | |
| 160 | + | |
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
153 | 167 | | |
154 | 168 | | |
155 | 169 | | |
| |||
199 | 213 | | |
200 | 214 | | |
201 | 215 | | |
202 | | - | |
203 | 216 | | |
204 | 217 | | |
205 | 218 | | |
| 219 | + | |
206 | 220 | | |
207 | 221 | | |
208 | 222 | | |
| |||
Lines changed: 80 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
443 | | - | |
| 442 | + | |
| 443 | + | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
| 451 | + | |
| 452 | + | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
| 481 | + | |
| 482 | + | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
497 | 569 | | |
498 | 570 | | |
499 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | 519 | | |
521 | 520 | | |
522 | 521 | | |
| |||
548 | 547 | | |
549 | 548 | | |
550 | 549 | | |
551 | | - | |
552 | 550 | | |
553 | 551 | | |
554 | 552 | | |
| |||
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
564 | | - | |
565 | 562 | | |
566 | 563 | | |
567 | 564 | | |
| |||
1157 | 1154 | | |
1158 | 1155 | | |
1159 | 1156 | | |
1160 | | - | |
1161 | 1157 | | |
1162 | 1158 | | |
1163 | 1159 | | |
| |||
0 commit comments