-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify API, returning StatusOr instead of status vector. (#57)
PiperOrigin-RevId: 357261243 Co-authored-by: PINS Team <[email protected]>
- Loading branch information
Showing
4 changed files
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
In table invalid_constraints.forgot_quotes: | ||
P4Info to constraint info translation failed with the following errors: | ||
- In table invalid_constraints.forgot_quotes: | ||
Syntax error: @entry_restriction must be enclosed in '("' and '")' | ||
|
||
In table invalid_constraints.forgot_quotes_with_srcloc: | ||
- In table invalid_constraints.forgot_quotes_with_srcloc: | ||
Syntax error: @entry_restriction must be enclosed in '("' and '")' | ||
|
||
In @entry_restriction of table invalid_constraints.empty_restriction; at offset line 1, column 1: | ||
- In @entry_restriction of table invalid_constraints.empty_restriction; at offset line 1, column 1: | ||
Parse error: unexpected token: <END_OF_INPUT>. Expected true, false, <BINARY>, <OCTARY>, <DECIMAL>, <HEXADEC>, <ID>, !, -, or (. | ||
|
||
e2e_tests/invalid_constraints.p4:21:3: | ||
- e2e_tests/invalid_constraints.p4:21:3: | ||
| @entry_restriction(" | ||
21 | ") | ||
| ^ | ||
Parse error: unexpected token: <END_OF_INPUT>. Expected true, false, <BINARY>, <OCTARY>, <DECIMAL>, <HEXADEC>, <ID>, !, -, or (. | ||
|
||
e2e_tests/invalid_constraints.p4:27:5-15: | ||
- e2e_tests/invalid_constraints.p4:27:5-15: | ||
| @entry_restriction(" | ||
27 | foo.bar.baz == 2 | ||
| ^^^^^^^^^^^ | ||
Type error: unknown key foo.bar.baz | ||
|
||
In @entry_restriction of table invalid_constraints.unknown_key_no_srcloc; at offset line 1, columns 1 to 11: | ||
- In @entry_restriction of table invalid_constraints.unknown_key_no_srcloc; at offset line 1, columns 1 to 11: | ||
Type error: unknown key foo.bar.baz | ||
|
||
e2e_tests/invalid_constraints.p4:38:21-22: | ||
- e2e_tests/invalid_constraints.p4:38:21-22: | ||
| @entry_restriction(" | ||
38 | foo.bar.baz == 0b2 | ||
| ^^ | ||
Parse error: unexpected token: <ID>. Expected <END_OF_INPUT>, ), ::, &&, ;, ||, ->, ==, !=, >, >=, <, or <=. | ||
|
||
In @entry_restriction of table invalid_constraints.bad_binary_numeral_no_srcloc; at offset line 1, columns 17 to 18: | ||
- In @entry_restriction of table invalid_constraints.bad_binary_numeral_no_srcloc; at offset line 1, columns 17 to 18: | ||
Parse error: unexpected token: <ID>. Expected <END_OF_INPUT>, ), ::, &&, ;, ||, ->, ==, !=, >, >=, <, or <=. | ||
|
||
e2e_tests/invalid_constraints.p4:52:11-14: | ||
- e2e_tests/invalid_constraints.p4:52:11-14: | ||
| /**************************************************************************/ | ||
52 | error here | ||
| ^^^^ | ||
Parse error: unexpected token: <ID>. Expected <END_OF_INPUT>, ), ::, &&, ;, ||, ->, ==, !=, >, >=, <, or <=. | ||
|
||
e2e_tests/invalid_constraints.p4:60:5-15: | ||
- e2e_tests/invalid_constraints.p4:60:5-15: | ||
| @entry_restriction(" | ||
60 | ternary_key::prefix_length | ||
| ^^^^^^^^^^^ | ||
Type error: expression of type ternary<32> has no field 'prefix_length' | ||
|
||
e2e_tests/invalid_constraints.p4:70:5-10: | ||
- e2e_tests/invalid_constraints.p4:70:5-10: | ||
| @entry_restriction(" | ||
70 | 0x0F0F :: value | ||
| ^^^^^^ | ||
Type error: expression of type int has no field 'value' | ||
|
||
e2e_tests/invalid_constraints.p4:77:42-46: | ||
- e2e_tests/invalid_constraints.p4:77:42-46: | ||
| @entry_restriction(" | ||
77 | -0x0F0F == -0o01234567 -> !false && -false | ||
| ^^^^^ | ||
Type error: expected type int, got bool | ||
|
||
e2e_tests/invalid_constraints.p4:84:33: | ||
- e2e_tests/invalid_constraints.p4:84:33: | ||
| @entry_restriction(" | ||
84 | !false -> -8 == -0b1000 || !1 | ||
| ^ | ||
Type error: expected type bool, got int | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters