Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-19 Thread John Snow
On 5/19/21 3:01 AM, Markus Armbruster wrote: Hmm, this commit actually fixes incorrect typing, doesn't it? Updated the commit message with *THREE* references to commits that this patch technically fixes.

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-19 Thread John Snow
On 5/19/21 3:01 AM, Markus Armbruster wrote: In commit f5d4361cda "qapi/source.py: add type hint annotations", I believe. Hmm, this commit actually fixes incorrect typing, doesn't it? Yes. It just wasn't caught because this file wasn't being checked yet. I tried to avoid this for a long

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-19 Thread Markus Armbruster
John Snow writes: > On 5/18/21 5:28 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Remove the try/except block that handles file-opening errors in >>> QAPISchemaParser.__init__() and add one each to >>> QAPISchemaParser._include() and QAPISchema.__init__() respectively. >>> >>> >>>

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-19 Thread Markus Armbruster
John Snow writes: > On 5/18/21 5:28 AM, Markus Armbruster wrote: >> QAPIError not having .info don't actually exist before this patch. > > It's defined by QAPISourceError now, I just missed this spot in > test-qapi. It isn't used in practice until now, however. I had QAPIError mentally filed

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-18 Thread John Snow
On 5/18/21 5:28 AM, Markus Armbruster wrote: QAPIError not having .info don't actually exist before this patch. It's defined by QAPISourceError now, I just missed this spot in test-qapi. It isn't used in practice until now, however. --js

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-18 Thread John Snow
On 5/18/21 5:28 AM, Markus Armbruster wrote: John Snow writes: Remove the try/except block that handles file-opening errors in QAPISchemaParser.__init__() and add one each to QAPISchemaParser._include() and QAPISchema.__init__() respectively. The short-ish version of what motivates this

Re: [PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-18 Thread Markus Armbruster
John Snow writes: > Remove the try/except block that handles file-opening errors in > QAPISchemaParser.__init__() and add one each to > QAPISchemaParser._include() and QAPISchema.__init__() respectively. > > > The short-ish version of what motivates this patch is: > > - It's hard to write a good

[PATCH v2 01/21] qapi/parser: Don't try to handle file errors

2021-05-11 Thread John Snow
Remove the try/except block that handles file-opening errors in QAPISchemaParser.__init__() and add one each to QAPISchemaParser._include() and QAPISchema.__init__() respectively. The short-ish version of what motivates this patch is: - It's hard to write a good error message in the init