Fix factual and spec errors in docs content - #521
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the documentation set to correct a broad set of factual/spec mismatches (Slice grammar reference, encoding examples, and getting-started/tutorial content) so the published docs align with actual slicec parsing behavior, generator outputs, and on-the-wire encoding.
Changes:
- Sync Slice grammar reference pages with slicec behavior (enum modifiers/grammar productions, attribute tokens, token naming).
- Fix Slice encoding documentation inaccuracies (tag example byte, varuint62 vs QUIC details, request/response stream continuation description).
- Update getting-started tutorials and other guides for template drift, naming, and corrected examples.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| content/slice/language-reference/slice-grammar.md | Align grammar + prose with slicec (enum/attributes/tokens) and fix several factual notes/examples. |
| content/slice/language-reference/preprocessor-directives.md | Rename the #undef token name to match the syntactic grammar. |
| content/slice/language-reference/doc-comments.md | Remove unsupported @throws grammar elements. |
| content/slice/language-guide/sequence-types.md | Correct C# fast-path wording to “fixed-size numeric” types. |
| content/slice/language-guide/operation.md | Fix cs::encodedReturn attribute name and grammar in prose. |
| content/slice/language-guide/module.md | Clarify that modules scope interfaces as well as types. |
| content/slice/language-guide/interface.md | Correct wording around proxies and fix DefaultServicePath example. |
| content/slice/language-guide/dictionary-types.md | Clarify dictionary key constraints (basic enums). |
| content/slice/language-guide/comments.md | Correct block comment nesting claim and doc-comment example signatures. |
| content/slice/language-guide/attributes.md | Fix cs::encodedReturn attribute name in the attribute table. |
| content/slice/index.md | Update built-in generic types count and add Result link. |
| content/slice/encoding/user-defined-types.md | Fix tagged-field worked example (tag byte). |
| content/slice/encoding/primitive-types.md | Correct varuint62 vs QUIC comparison details. |
| content/slice/encoding/icerpc.md | Fix request/response stream continuation pairing description. |
| content/slice/basics/slice-files.md | Replace invalid circular-reference example with valid cross-file struct/interface usage. |
| content/slice/basics/examples.md | Remove nonexistent doc-comment @param color in example. |
| content/icerpc/slic-transport/protocol-frames.md | Fix Version frame value type name (varuint62). |
| content/icerpc/dependency-injection/di-and-icerpc-for-csharp.md | Split/clarify accidentally merged DI bullet list. |
| content/icerpc-for-ice-users/rpc-core/object-adapter.md | Clarify what CancelKeyPressed represents in the snippet. |
| content/icerpc-for-ice-users/ice-definitions/sequence-types.md | Remove outdated claim about priority queue availability in .NET. |
| content/getting-started/installation/template.md | Clarify --transport support scope (non-DI templates). |
| content/getting-started/icerpc-slice-tutorial/server-tutorial.md | Update template paths/output files and document Program.Authentication.cs. |
| content/getting-started/icerpc-slice-tutorial/client-tutorial.md | Update template paths and generated output files. |
| content/getting-started/icerpc-protobuf-tutorial/server-tutorial.md | Update proto contract path to match templates. |
| content/getting-started/icerpc-protobuf-tutorial/client-tutorial.md | Update proto contract path and “proxy” → “client” wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Tags consist of the `tag` keyword, followed by a non-negative integer wrapped in a pair of parentheses. | ||
| This integer must be between `0` and `2,147,483,647` (the maximum value of a signed 32-bit integer). | ||
| Tags can only be applied to [fields][field] and [parameters][parameter] with an optional type. |
There was a problem hiding this comment.
This matches slicec's actual parser: the Tag rule in grammar.lalrpop is tag_keyword "(" SignedInteger ")" (same on 0.6-era v0.3.3), and parse_tag_value rejects negatives afterwards as a semantic error. The grammar production is faithful to the parser; "non-negative" (like the 2,147,483,647 max on the next line) is a semantic constraint the grammar deliberately doesn't encode. Keeping SignedInteger.
There was a problem hiding this comment.
Correction on the version cited here: icerpc-csharp 0.6 pins slicec 0.4.0, not 0.3.x — the Tag rule is identical there (tag_keyword "(" SignedInteger ")" with parse_tag_value rejecting negatives), so the conclusion stands.
| : tag_keyword left_parenthesis SignedInteger right_parenthesis | ||
| ; |
There was a problem hiding this comment.
Same as the section grammar: slicec's parser really does accept a SignedInteger here and rejects negative values during validation, so the production matches the parser. Keeping SignedInteger.
There was a problem hiding this comment.
Same correction as above: verified against slicec 0.4.0 (what 0.6 pins) — identical rule, conclusion stands.
|
|
||
| interface Chicken { | ||
| Egg lay() | ||
| struct Chicken { |
There was a problem hiding this comment.
This is a good fix. The previous example relied on proxy custom types (with the custom not shown), which was confusing.
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Co-authored-by: Austin Henriksen <austin.r.henriksen79@gmail.com>
Fixes ~35 factual errors across 25 content pages, found during a full editorial review. Every claim was verified against slicec 0.4.0 (the version icerpc-csharp 0.6 pins), the icerpc-csharp generators, or recomputed by hand.
Slice encoding
user-defined-types.md— the worked example encoded tag 2 as0x10; a varint32 of 2 on 1 byte is0x08icerpc.md— the stream argument / stream return value pairing was swapped between outgoing request and responseprimitive-types.md— varuint62 vs QUIC: byte order is not the only difference; QUIC stores the 2-bit length in the most significant bits of the first byte, Slice in the least significant bitsSlice grammar reference (brought back in sync with slicec 0.4.0)
Enumproduction gains"compact"?— placed before"unchecked"?, matching the parserEnumeratorproduction gains the variant field list("(" UndelimitedList<Field> ")")?FileAttribute/LocalAttributenow use the bracket tokens ([[ ]]/[ ]) instead of nonexistent/wrong brace tokensFileCompilationModeproduction and itsSliceFilePreludealternatives — themodestatement no longer exists in slicec 0.4.0 (it referenced amode_keywordtoken that was never defined anyway)CompactId(referenced by nothing) andThrowsBlock/throws_keyword(slicec has no@throws)undefine_keywordto match the syntactic grammar0x_ab_cd_efis0xabcdefLanguage guide & basics
DefaultServicePathsample →"/Example.Widget"(::→., per the generator)slice-files.md— it used invalid syntax (Egg lay()) and interfaces as return types; the two files now exchange structsResult)@param colorand stopped returning interfaceWidgetdirectlycs::encodeReturn→cs::encodedReturn(per the generator source)Versionframe carriesvaruint62(notvarint62) valuesGetting started (0.6 template drift)
slice/VisitorCenter/Greeter.sliceandproto/visitor_center/greeter.proto(matching the 0.6 templates and the pages' own screenshots)--transportis only defined by the non-DI templatesgenerated/Greeter.csandgenerated/Greeter.IceRpc.csProgram.Authentication.cslike its three sibling tutorialsMisc
PriorityQueue<TElement, TPriority>exists since .NET 6)CancelKeyPressedhelperDeliberate skip: the
source_block;notation nit — the existing comment in the grammar already explains it.🤖 Generated with Claude Code