Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Oct 09, 2020 at 07:26:02PM +0200, Markus Armbruster wrote: >> John Snow writes: >> >> > The edge case is that if the name is '', this expression returns a >> > string instead of a bool, which violates our declared type. >> > In practice, module names are not al

Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 07:26:02PM +0200, Markus Armbruster wrote: > John Snow writes: > > > The edge case is that if the name is '', this expression returns a > > string instead of a bool, which violates our declared type. > > > > In practice, module names are not allowed to be the empty string,

Re: [PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread Markus Armbruster
John Snow writes: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. > > In practice, module names are not allowed to be the empty string, but > this constraint is not modeled for the type system. > > Signed-off-by: J

[PATCH v6 26/36] qapi/gen.py: Fix edge-case of _is_user_module

2020-10-09 Thread John Snow
The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. In practice, module names are not allowed to be the empty string, but this constraint is not modeled for the type system. Signed-off-by: John Snow Reviewed-by: Cleber Ro