Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-10 Thread Victor Toso
Hi, On Fri, Nov 10, 2023 at 01:54:50AM -0800, Andrea Bolognani wrote: > On Thu, Nov 09, 2023 at 07:35:04PM +0100, Victor Toso wrote: > > On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > > > Additionally, this would allow client code that *looks* at the > > > union to keep workin

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 07:35:04PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > > Additionally, this would allow client code that *looks* at the > > union to keep working even if actual data is later added to the > > branch; client code that *creat

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 09:29:28AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:27:00PM +0200, Victor Toso wrote: > > This patch handles QAPI union types and generates the equivalent data > > structures and methods in Go to handle it. > > > > The QAPI union type has two types of

Re: [PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-11-09 Thread Andrea Bolognani
On Mon, Oct 16, 2023 at 05:27:00PM +0200, Victor Toso wrote: > This patch handles QAPI union types and generates the equivalent data > structures and methods in Go to handle it. > > The QAPI union type has two types of fields: The @base and the > @Variants members. The @base fields can be considere

[PATCH v2 07/11] qapi: golang: Generate qapi's union types in Go

2023-10-16 Thread Victor Toso
This patch handles QAPI union types and generates the equivalent data structures and methods in Go to handle it. The QAPI union type has two types of fields: The @base and the @Variants members. The @base fields can be considered common members for the union while only one field maximum is set for