Matter 1.3 (#905)
* Extract lexer from Conformance.ts
This will allow for re-use for constraints and any other DSLs we encounter
* Initial 1.3 ingestion
- Changes default spec source to Matter 1.3
- Adds new datatypes
- Adds new quality flags
- Adds v1.3 spec.ts
* Minor model validation improvements
- Support Matter 1.3 use of numbers in feature names
- Support inheritance of "direction" property from shadowed commands
* Model index bug fixes
Addresses a couple of places where child indices could become inconsistent afetr tree mutation.
* Refactoring and spec fixes for 1.3
- Moves "fixes" out of translate-cluster.ts into a separate file to isolate special cases
- Extract datatype translation from translate-cluster.ts. Better hygiene and allows for automated processing of global elements
- Adds a handful of special cases for new bugs in 1.3 spec
- Partial implementation of automatic translation for global elements
* Finish ingestion of global elements
* More 1.3 fixes
* Numerous intertwined model updates
Including but not limited to:
- All datatypes now load automatically (Globals.ts will go away shortly)
- Adds negative number support to lexer
- Fixes and upgrades to spec datatype ingestion
- Adds "ByteSize" type to table translation schema
- Add guards to protect against totally borking model during generation
- Adds resolution of qualified names; uses this to work around spec bugs
- Additional overrides for spec bugs
- Better handle insertion of models parented by elements
* Generated Matter 1.3 model
Globals.ts is no more as we now ingest all elements from the specification, including all those that previously were
hand-coded in Globals.
Includes additional fixes/improvements to spec ingestion and overrides for spec bugs.
* Spec parsing fixes, additional conformance rules
Addresses issues that turned up generating clusters. Some spec parsing updates but mostly extending the manual rules
for features and component inference.
Made cluster generation log errors rather than crashing but act like a dry run if it encounters errors.
* More model fixes & improvements, 1.3 changes
- Support 1.2+ cluster-specific status codes
- Fixed codegen with qualified model names
- Hack to remove a couple of malformatted footnotes in 1.2+ spec
- Add validation of imports during codegen
- Remove obsolete (& never used) Scenes cluster stuff
- Regenerate model for 1.3
- Includes some temporary manual changes to generated 1.1 code to allow for compatibility with 1.3 types
* Organization & fixes
- Reorganize the various one-off changes we make during spec ingestion into a "repairs" subdirectory
- Make a cleaner framework for repairing HTML in the incoming stream
- Adds a "validation exceptions" concept that allows exceptions to specific validation rules
- Model shadows are now officially part of the inheritance hierarchy
- The only remaining errors in final model are dependent on features we haven't implemented yet
* Couple of new overrides and other fixes
* Conformance improvements
- Add proper handling for conformance-based element selection when merging models
- Do a less haphazard job of removing Zigbee stuff from the model
- Temporary ignore deprecation of Thermostat SCH feature until we get confirmation it's really removed which seems unfortunate
* Remove behaviors not in 1.3 spec
* Refactor TLV number generation a bit
* Move clusters to Matter 1.3
* More spec ingestion improvements
- Support for spec sections that contain a base cluster with a set of aliases
- Add PICS code to cluster elements
- Add options to control endpoint generation
- Remove "Time Sync" type mapping because it's really called "Time Synchronization" now
* Add "aliasing" to cluster generation
Modified generation of clusters with only inherited elements so that they create an alias to the base cluster rather
than redundantly generating all of the elements.
Regenerated clusters.
* Parse enums from "namespace" sections
There are various definitions that are effectively enums scattered throughout the cluster document that generally fall
under the category of "namespace extension". This extracts those definitions into proper enum types.
* A number of spec ingestion and codegen updates
- Generate global types whilst generating clusters
- Import types generated elsewhere into clusters rather than regenerating for every cluster
- Extract naming and scope management from TlvGenerator into new "Scope" class
- Replace ad-hoc algorithm for avoiding name conflicts:
- Produces more compact names
- Better prioritizes which definitions get the canonical name when there are conflicts
- Exposes names used in codegen across scopes so imports are more reliable
- Also moves support for importing generated types into a new "ScopedFile" class that is scope aware
- Make generated imports always use the shortest relative path possible
- Further constricts structure for generated import paths to make them less error prone
- A few spec ingestion fixes
- Regenerate spec, model and clusters
- Replace StatusCode enum with the generated version
* Improve search for requirement elements.
* Matter 1.3 behaviors & endpoints
- Fixes a few issues with new codegen, mostly related to new path code
- Modifies servers that referenced types in interface files to instead reference the version in the cluster files
- Changed AggregatorEndpoint references to AggregatorDevice since its classification changed from utility to simple
* Tweaked cluster and behavior generation a bit
- Fixed small bug when assessing whether to inject newline between definitions
- Generate separate base definition for alias clusters
- Do not spread base unless necessary
- Generate interfaces for abstract clusters
- Use base class's interface for alias clusters
* Matter 1.3 behaviors and endpoints
* A handful of fixes
- Resurrects any type
- Better support for defaults when there are multiple variants of an element
- Other minor stuff
- Modified Model.all
* A handful of test fixes
* Make structure test more useful for diagnostics
* Add support for default cluster components
Without this matter 1.3 On/Off cluster base component doesn't even have an "on" command.
* Workaround for TS bug
FeaturesAsFlags was not matching feature bitmaps in very narrow circumstances that became more relevant due to Matter
1.3's increased reliance on !FEATURE conformance.
* Conformance error tweaks, test fixes
Attempt to make conformance errors more intuitive. Various fixes for matter.js tests.
* Fix matter-node.js tests
* Fix example and CHIP testing builds
* Make prettier happy
* Clean up specification constant definitions
* Revert Aggregator back to a system endpoint
Spec be damned
* WC - use defacto standard instead of "standard"
Per Ingo. Added comments describing why.
* Deprecate DeviceTypes
* Remove ClusterRevision override
* Add CHIP testing to test runner, fix tests
- Adds "matter-test chip" to run CHIP tests
- Automatically builds connectedhomeip for testing in a Docker container and runs tests there
- Includes different test configs, e.g. "matter-test chip --environment=legacy-slow"
- Tries to clean up CHIP logging output to make it easier to digest failures
- Adds a PIC parser that supports merging of PIC files
- Use above to patches CHIP's ci-pic-values with a couple of changes we require
- Remove reachable event from bridge apps because CHIP tests do not expect it
- Monkey patch BridgedDeviceBasicInformation.Cluster down to revision 2 for testing (works around testing bug)
- Fix a few default value issues CHIP testing turned up
- Fix a conformance bug
- Remove override for BasicInformation that was setting the revision too low
- Modifies test setup code to better handle load order
- Adds default implementations for localization clusters (LocalizationConfiguration, TimeFormatLocalization and UnitLocalization)
* Update Chip tests for Matter 1.3 branch (#1)
* Adjust chip tests and update chip override
* [execute-chiptests]
* [execute-chiptests] tweak gha
* [execute-chiptests] fix build
* [execute-chiptests] adjust test settings
* [execute-chiptests] adjust test settings
* [execute-chiptests] docs
* [execute-chiptests] finalize PR
* Fixes required after rebase on ACL changes
* Update PICS values per Ingo's docs
* Umm, OK prettier
* Changelog and address PR feedback.
* Bump version to 0.10.0-alpha
---------
Co-authored-by: Ingo Fischer <github@fischer-ka.de>