Page MenuHomePhabricator

Validate the values on the keys on a user-defined type
Closed, ResolvedPublic

Description

Due to the implementation of the fix for T262097 we stopped validating if the key-types are valid types.

Whereas this unblocked the creation of recursive types, a question is whether we cannot do a bit more validation.

For example:

  • check that the ZID exists
  • check that the type of the ZID is Z4/Type

Alternatively, still do a full validation, but remember all the types we already started validating and return if we validate a type that is already being validated on this specific run. This would require a parameter for the validation function that carries state.

This all may become obsolete if we implement https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Errors_messages_on_ZObjects instead of doing full validation every time.

Event Timeline

We should split off well-formedness and validation, and have distinct error types for validation errors so that we can display them.

So here is what I mean specifically with this:

When I create a type that consists of a boolean and a string, an instance of that type should check that it is built out of a valid boolean and a valid string.

DVrandecic renamed this task from Better validation for recursive types to Validate the values on the keys on a user-defined type.Oct 20 2021, 12:25 AM

@gengh This looks like the task of what we were talking about on Tuesday?