Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-28 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Sep 25, 2020 at 11:15:28AM -0400, Eduardo Habkost wrote: >> On Fri, Sep 25, 2020 at 03:00:51PM +0200, Markus Armbruster wrote: >> > Eduardo Habkost writes: >> > >> > > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: >> > >> The edge case is that if t

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-25 Thread John Snow
On 9/25/20 9:00 AM, Markus Armbruster wrote: Eduardo Habkost writes: On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. Signed-off-by: John Snow --- scrip

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-25 Thread Eduardo Habkost
On Fri, Sep 25, 2020 at 11:15:28AM -0400, Eduardo Habkost wrote: > On Fri, Sep 25, 2020 at 03:00:51PM +0200, Markus Armbruster wrote: > > Eduardo Habkost writes: > > > > > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > > >> The edge case is that if the name is '', this expression re

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-25 Thread Eduardo Habkost
On Fri, Sep 25, 2020 at 03:00:51PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > >> The edge case is that if the name is '', this expression returns a > >> string instead of a bool, which violates our declared type. >

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-25 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: >> The edge case is that if the name is '', this expression returns a >> string instead of a bool, which violates our declared type. >> >> Signed-off-by: John Snow >> --- >> scripts/qapi/gen.py | 2 +- >> 1 fi

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread John Snow
On 9/23/20 7:08 PM, Cleber Rosa wrote: On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. Signed-off-by: John Snow --- scripts/qapi/gen.py | 2 +- 1 file ch

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 07:10:35PM -0400, Cleber Rosa wrote: > On Wed, Sep 23, 2020 at 02:33:35PM -0400, Eduardo Habkost wrote: > > On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > > > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > > > This changes behavior if name=='', and I guess thi

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 07:08:50PM -0400, Cleber Rosa wrote: > On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > > The edge case is that if the name is '', this expression returns a > > string instead of a bool, which violates our declared type. > > > > Signed-off-by: John Snow > > ---

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Wed, Sep 23, 2020 at 02:33:35PM -0400, Eduardo Habkost wrote: > On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > > This changes behavior if name=='', and I guess this is OK, but > > > I'm not sure. I miss documentation on `visit_modu

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Cleber Rosa
On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. > > Signed-off-by: John Snow > --- > scripts/qapi/gen.py | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Eduardo Habkost
On Wed, Sep 23, 2020 at 02:29:28PM -0400, John Snow wrote: > On 9/23/20 11:17 AM, Eduardo Habkost wrote: > > This changes behavior if name=='', and I guess this is OK, but > > I'm not sure. I miss documentation on `visit_module()`, > > `visit_include()`, and `_is_user_module()`. I don't know what

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread John Snow
On 9/23/20 11:17 AM, Eduardo Habkost wrote: This changes behavior if name=='', and I guess this is OK, but I'm not sure. I miss documentation on `visit_module()`, `visit_include()`, and `_is_user_module()`. I don't know what `name` means here, and what is a "user module". Good spot, I missed

Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-23 Thread Eduardo Habkost
On Tue, Sep 22, 2020 at 05:00:47PM -0400, John Snow wrote: > The edge case is that if the name is '', this expression returns a > string instead of a bool, which violates our declared type. > > Signed-off-by: John Snow > --- > scripts/qapi/gen.py | 2 +- > 1 file changed, 1 insertion(+), 1 delet

[PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-22 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. Signed-off-by: John Snow --- scripts/qapi/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index 9898