Commit 08367e0
committed
[Java,C#,C++] Allow custom flag/properties to enable precedence checks.
Some users would like the ability to enable precedence checks on some
schemas but not others.
Initially, I considered generating flags or system properties with the
schema namespace; however, this forces the more-complex scheme on all
users. It also might get unwieldly with long namespaces. It also assumes
a one-to-one correspondence between namespaces and schemas.
Instead, I have introduced two new system properties that can be applied
at code generation time:
- `sbe.precedence.checks.flagName`, which controls the symbol/macro used
to enable precedence checks at build time in the generated C#/C++ code.
It defaults to `"SBE_ENABLE_PRECEDENCE_CHECKS"`.
- `sbe.precedence.checks.propName`, which controls the property name
used to enable precedence checks at runtime in the generated Java code.
It defaults to `"sbe.enable.precedence.checks"`.
Now, users can run SbeTool with different values for these system
properties to generate code with different enablement flags.
Note above that the defaults are:
- `SBE_ENABLE_PRECEDENCE_CHECKS` rather than
`SBE_ENABLE_SEQUENCING_CHECKS`, and
- `sbe.enable.precedence.checks` rather than
`sbe.enable.sequencing.checks`.
These changes and a change to another system property:
- `sbe.generate.sequencing.checks` -> `sbe.generate.precedence.checks`
address some feedback from Martin on the associated PR #948.1 parent 69d13b6 commit 08367e0
File tree
11 files changed
+224
-197
lines changed- csharp/sbe-generated
- sbe-tool/src
- main/java/uk/co/real_logic/sbe
- generation
- common
- cpp
- csharp
- java
- ir/generated
- test/cpp
11 files changed
+224
-197
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
283 | | - | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
547 | | - | |
| 551 | + | |
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
| |||
734 | 738 | | |
735 | 739 | | |
736 | 740 | | |
737 | | - | |
| 741 | + | |
738 | 742 | | |
739 | 743 | | |
740 | 744 | | |
| |||
759 | 763 | | |
760 | 764 | | |
761 | 765 | | |
762 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
763 | 769 | | |
764 | 770 | | |
765 | 771 | | |
| |||
770 | 776 | | |
771 | 777 | | |
772 | 778 | | |
773 | | - | |
| 779 | + | |
| 780 | + | |
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
45 | 63 | | |
46 | 64 | | |
47 | 65 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
3083 | 3083 | | |
3084 | 3084 | | |
3085 | 3085 | | |
3086 | | - | |
| 3086 | + | |
3087 | 3087 | | |
3088 | 3088 | | |
3089 | 3089 | | |
| |||
3101 | 3101 | | |
3102 | 3102 | | |
3103 | 3103 | | |
3104 | | - | |
| 3104 | + | |
3105 | 3105 | | |
3106 | 3106 | | |
3107 | 3107 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
| 1586 | + | |
1587 | 1587 | | |
1588 | 1588 | | |
1589 | 1589 | | |
| |||
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
1673 | | - | |
| 1673 | + | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
| |||
1936 | 1936 | | |
1937 | 1937 | | |
1938 | 1938 | | |
1939 | | - | |
| 1939 | + | |
1940 | 1940 | | |
1941 | 1941 | | |
1942 | 1942 | | |
| |||
2556 | 2556 | | |
2557 | 2557 | | |
2558 | 2558 | | |
2559 | | - | |
| 2559 | + | |
2560 | 2560 | | |
2561 | 2561 | | |
2562 | 2562 | | |
| |||
2588 | 2588 | | |
2589 | 2589 | | |
2590 | 2590 | | |
2591 | | - | |
| 2591 | + | |
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
| 311 | + | |
311 | 312 | | |
312 | | - | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
413 | | - | |
| 414 | + | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
| |||
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | | - | |
| 497 | + | |
497 | 498 | | |
498 | 499 | | |
499 | 500 | | |
| |||
755 | 756 | | |
756 | 757 | | |
757 | 758 | | |
758 | | - | |
| 759 | + | |
759 | 760 | | |
760 | 761 | | |
761 | 762 | | |
| |||
3424 | 3425 | | |
3425 | 3426 | | |
3426 | 3427 | | |
3427 | | - | |
| 3428 | + | |
3428 | 3429 | | |
3429 | 3430 | | |
3430 | 3431 | | |
| |||
0 commit comments