Repository navigation
docs: bounds on types in the IDL guide - #142
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents bounds on types (core#98, rollout step 12), now that steps 1-6 are merged in core, generation, comline-rust and comline-typescript. Follows the "Docs follow-ups" in core#197.
Pages
guide/idl/types.md:char;T[max N]andT[N]; the required maximum and where it comes from (the position, a settings default,@unverified; no built-in default); how a bounded alias is used (no[...]suffix on an alias of a string or list where used); a note that generators don't enforce maxima yet and refusechar.guide/idl/const.md: sizes taken from constants (char[max NAME_MAX],u8[max u16::MAX]), replacing "array sizes take a literal only".guide/idl/settings.md:bounds.string.max,bounds.array.max,bounds.depth.max: units, ranges, layering, scoped keys, stored resolved, own package only.guide/idl/annotations.md:@max_depth.guide/idl/validator.md:any[]targets, bounds ignored when matching, a section on the std validators (NonEmpty,MinChars,MinItems,IntRange,StringBounds) and the build checks against a type's maximum.guide/idl/use.md: the std table and example.getting-started.md: the sample schema useschar[max 256].reference/languages/{index,rust,typescript}.md: regenerated withscripts/sync-language-support.py(newboundsandcharsfeatures, vector counts).Checks
scripts/check-idl-drift.py: no drift (was:charandmaxundocumented).scripts/sync-language-support.py --check: up to date.std/*.mdpins the pre-bounds core and can't parsechar[max N]. That clears when the CLI moves to the bounded core (bounds step 10). Not fixed here.Other guide pages still use a bare
stringorT[]in short examples; types.md says so. They build once a default is set.Refs ComlineProject/core#98, ComlineProject/core#197