diff mbox series

[v2,01/16] scripts/git.orderfile: Match QAPI schema more precisely

Message ID 20190910063724.28470-2-armbru@redhat.com (mailing list archive)
State New, archived
Headers show
Series qapi: Schema language cleanups & doc improvements | expand

Commit Message

Markus Armbruster Sept. 10, 2019, 6:37 a.m. UTC
Pattern *.json also matches the tests/qapi-schema/*.json.  Separates
them from the tests/qapi-schema/*.{err,exit,out} in diffs.  I hate
that.  Change the pattern to match just the "real" QAPI schemata.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 scripts/git.orderfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 10, 2019, 6:56 a.m. UTC | #1
On 9/10/19 8:37 AM, Markus Armbruster wrote:
> Pattern *.json also matches the tests/qapi-schema/*.json.  Separates
> them from the tests/qapi-schema/*.{err,exit,out} in diffs.  I hate
> that.  Change the pattern to match just the "real" QAPI schemata.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  scripts/git.orderfile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/git.orderfile b/scripts/git.orderfile
> index ac699700b1..e89790941c 100644
> --- a/scripts/git.orderfile
> +++ b/scripts/git.orderfile
> @@ -19,11 +19,11 @@ Makefile*
>  *.mak
>  
>  # qapi schema
> -*.json
> +qapi/*.json
> +qga/*.json
>  
>  # headers
>  *.h
>  
>  # code
>  *.c
> -
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Eric Blake Sept. 10, 2019, 1:41 p.m. UTC | #2
On 9/10/19 1:37 AM, Markus Armbruster wrote:
> Pattern *.json also matches the tests/qapi-schema/*.json.  Separates
> them from the tests/qapi-schema/*.{err,exit,out} in diffs.  I hate
> that.  Change the pattern to match just the "real" QAPI schemata.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  scripts/git.orderfile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Should we ever do a mass rename of *.json into *.qapi (since our qapi
files are NOT quite JSON)?  But that doesn't change the viability of
this patch.
Markus Armbruster Sept. 13, 2019, 2:14 p.m. UTC | #3
Eric Blake <eblake@redhat.com> writes:

> On 9/10/19 1:37 AM, Markus Armbruster wrote:
>> Pattern *.json also matches the tests/qapi-schema/*.json.  Separates
>> them from the tests/qapi-schema/*.{err,exit,out} in diffs.  I hate
>> that.  Change the pattern to match just the "real" QAPI schemata.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>  scripts/git.orderfile | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>
> Should we ever do a mass rename of *.json into *.qapi (since our qapi
> files are NOT quite JSON)?  But that doesn't change the viability of
> this patch.

Naming them .json is misleading.  We're closer to Python than to JSON.
Many .json files ask Emacs for Python mode, because that works better
than JavaScript mode.

Options:

* Rename to .qapi.  The files that don't ask for Python mode now get
  Fundamental mode instead of JavaScript mode.  Minor regression.

* Rename to .py, and drop the lines asking for Python mode.  Still
  misleading, but less so.

* Likewise, and tweak the syntax so it's actually Python.

* Switch to some less egregiously ill-suited syntax.  TOML, perhaps.

* Do nothing.

Right now, I'd prefer to do nothing.
diff mbox series

Patch

diff --git a/scripts/git.orderfile b/scripts/git.orderfile
index ac699700b1..e89790941c 100644
--- a/scripts/git.orderfile
+++ b/scripts/git.orderfile
@@ -19,11 +19,11 @@  Makefile*
 *.mak
 
 # qapi schema
-*.json
+qapi/*.json
+qga/*.json
 
 # headers
 *.h
 
 # code
 *.c
-