qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] qapi-go: add generator for Golang interface
@ 2023-10-16 15:26 Victor Toso
  2023-10-16 15:26 ` [PATCH v2 01/11] qapi: re-establish linting baseline Victor Toso
                   ` (12 more replies)
  0 siblings, 13 replies; 43+ messages in thread
From: Victor Toso @ 2023-10-16 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Markus Armbruster, John Snow, Daniel P . Berrangé,
	Andrea Bolognani

This patch series intent is to introduce a generator that produces a Go
module for Go applications to interact over QMP with QEMU.

This is the second iteration:
 v1: https://lists.gnu.org/archive/html/qemu-devel/2023-09/msg06734.html

I've pushed this series in my gitlab fork:
https://gitlab.com/victortoso/qemu/-/tree/qapi-golang-v2

I've also generated the qapi-go module over QEMU tags: v7.0.0, v7.1.0,
v7.2.6, v8.0.0 and v8.1.0, see the commits history here:
https://gitlab.com/victortoso/qapi-go/-/commits/qapi-golang-v2-by-tags

I've also generated the qapi-go module over each commit of this series,
see the commits history here (using previous refered qapi-golang-v2)
https://gitlab.com/victortoso/qapi-go/-/commits/qapi-golang-v2-by-patch

Cheers,
Victor

* Changes:
 - All patches were rebased using black python formatting tool, awesome.
   (John) https://black.readthedocs.io/en/stable/
 - All patches were tested with flake8 and pylint. Minor complains
   remains. (John)
 - All generated types are sorted in alphabetical order (Daniel)
 - Using utf8 instead of ascii encoding of output files
 - Improved commit logs
 - renamed QapiError -> QAPIError (Daniel)
 - QAPIError's Error() returns only the description (Daniel)
 - Used more type hints (Where I could) (John)
 - Removed typehint from self in the Class implementation (John)
 - The Go code that is generated is now well formated. gofmt -w and
   goimport -w don't change a thing.
 - Added a fix from John
   https://lists.gnu.org/archive/html/qemu-devel/2023-10/msg01305.html
 - Added a tangent fix suggestion to main.py "scripts: qapi: black
   format main.py"

John Snow (1):
  qapi: re-establish linting baseline

Victor Toso (10):
  scripts: qapi: black format main.py
  qapi: golang: Generate qapi's enum types in Go
  qapi: golang: Generate qapi's alternate types in Go
  qapi: golang: Generate qapi's struct types in Go
  qapi: golang: structs: Address 'null' members
  qapi: golang: Generate qapi's union types in Go
  qapi: golang: Generate qapi's event types in Go
  qapi: golang: Generate qapi's command types in Go
  qapi: golang: Add CommandResult type to Go
  docs: add notes on Golang code generator

 docs/devel/index-build.rst          |    1 +
 docs/devel/qapi-golang-code-gen.rst |  376 ++++++++
 scripts/qapi/gen.py                 |    2 +-
 scripts/qapi/golang.py              | 1349 +++++++++++++++++++++++++++
 scripts/qapi/main.py                |   79 +-
 scripts/qapi/parser.py              |    5 +-
 6 files changed, 1781 insertions(+), 31 deletions(-)
 create mode 100644 docs/devel/qapi-golang-code-gen.rst
 create mode 100644 scripts/qapi/golang.py

-- 
2.41.0



^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2023-11-10 15:45 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 15:26 [PATCH v2 00/11] qapi-go: add generator for Golang interface Victor Toso
2023-10-16 15:26 ` [PATCH v2 01/11] qapi: re-establish linting baseline Victor Toso
2023-10-16 15:26 ` [PATCH v2 02/11] scripts: qapi: black format main.py Victor Toso
2023-10-18 11:00   ` Markus Armbruster
2023-10-18 11:13     ` Daniel P. Berrangé
2023-10-18 15:23     ` Victor Toso
2023-10-19  5:42       ` Markus Armbruster
2023-10-19  7:30         ` Daniel P. Berrangé
2023-10-16 15:26 ` [PATCH v2 03/11] qapi: golang: Generate qapi's enum types in Go Victor Toso
2023-10-16 15:26 ` [PATCH v2 04/11] qapi: golang: Generate qapi's alternate " Victor Toso
2023-11-06 15:28   ` Andrea Bolognani
2023-11-06 15:52     ` Victor Toso
2023-11-06 16:12       ` Andrea Bolognani
2023-11-09 17:34   ` Andrea Bolognani
2023-11-09 19:01     ` Victor Toso
2023-11-10  9:58       ` Andrea Bolognani
2023-11-10 15:43         ` Victor Toso
2023-10-16 15:26 ` [PATCH v2 05/11] qapi: golang: Generate qapi's struct " Victor Toso
2023-10-16 15:26 ` [PATCH v2 06/11] qapi: golang: structs: Address 'null' members Victor Toso
2023-10-16 15:27 ` [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go Victor Toso
2023-11-09 17:29   ` Andrea Bolognani
2023-11-09 18:35     ` Victor Toso
2023-11-10  9:54       ` Andrea Bolognani
2023-11-10 15:45         ` Victor Toso
2023-10-16 15:27 ` [PATCH v2 08/11] qapi: golang: Generate qapi's event " Victor Toso
2023-11-09 17:59   ` Andrea Bolognani
2023-11-09 19:13     ` Victor Toso
2023-11-10  9:52       ` Andrea Bolognani
2023-10-16 15:27 ` [PATCH v2 09/11] qapi: golang: Generate qapi's command " Victor Toso
2023-10-16 15:27 ` [PATCH v2 10/11] qapi: golang: Add CommandResult type to Go Victor Toso
2023-11-09 18:24   ` Andrea Bolognani
2023-11-09 19:31     ` Victor Toso
2023-11-10  9:46       ` Andrea Bolognani
2023-10-16 15:27 ` [PATCH v2 11/11] docs: add notes on Golang code generator Victor Toso
2023-10-18 11:47   ` Markus Armbruster
2023-10-18 16:21     ` Victor Toso
2023-10-19  6:56       ` Markus Armbruster
2023-10-27 17:33 ` [PATCH v2 00/11] qapi-go: add generator for Golang interface Victor Toso
2023-10-31 16:42   ` Andrea Bolognani
2023-11-03 18:34     ` Andrea Bolognani
2023-11-06 12:00       ` Victor Toso
2023-11-09 18:35 ` Andrea Bolognani
2023-11-09 19:03   ` Victor Toso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).