Closed gizmo2342 closed 4 weeks ago
I think we should perhaps generalize this for all DataModel
instances by adding an option to the constructor that would raise warnings if encountering keys in the input data which are not supported by the schema. We could then use that option in the case of loading package manifests and add any generated warning messages to the array forwarded to the client.
I like that approach, even if it means that it is a v11 feature.
Like with a lot of developer oriented warnings, this kind of warning should not be shown to normal end users (in regards to manifests). It has no purpose for them and just increases warning noise for them about things they have zero need or ability to do anything about.
That's fine. It could be a CONFIG.debug
flag (e.g. CONFIG.debug.strict
) or even a runtime parameter (e.g. --strict
).
A good restriction to put in place in time for V12 to encourage developers to update to best practices with these manifest files.
Shifting to HIGH priority to do before V12 stable.
User Experience
This is a followup to https://discord.com/channels/170995199584108546/930898124782829638/1042035412992008243
Although the main issue happened to be a typo (
relationship
instead ofrelationships
), a check for unknown keys would have saved me (and possibly others) a lot of time.