On 12/10/19 3:47 PM, Nick Rosbrook wrote:
> From: Nick Rosbrook <rosbro...@ainfosec.com>
> 
> Introduce gengotypes.py to generate Go code the from IDL. As a first step,
> implement 'enum' type generation.
> 
> As a result of the newly-generated code, remove the existing, and now
> conflicting definitions in xenlight.go. In the case of the Error type,
> rename the slice 'errors' to 'libxlErrors' so that it does not conflict
> with the standard library package 'errors.' And, negate the values used
> in 'libxlErrors' since the generated error values are negative.
> 
> Signed-off-by: Nick Rosbrook <rosbro...@ainfosec.com>
> Reviewed-by: George Dunlap <george.dun...@citrix.com>
> ---
> Changes in v2:
> - Introduce Makefile targets for code generation
> - Re-generate Go code (includes new libxl_passtrhough enum).
> - Use *.gen.go naming convention for generated Go files.
> ---
>  tools/golang/xenlight/Makefile      |  18 +-
>  tools/golang/xenlight/gengotypes.py | 109 ++++++++
>  tools/golang/xenlight/types.gen.go  | 388 ++++++++++++++++++++++++++++
>  tools/golang/xenlight/xenlight.go   | 140 ++--------
>  4 files changed, 535 insertions(+), 120 deletions(-)
>  create mode 100644 tools/golang/xenlight/gengotypes.py
>  create mode 100644 tools/golang/xenlight/types.gen.go
> 
> diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile
> index 0987305224..681f32c234 100644
> --- a/tools/golang/xenlight/Makefile
> +++ b/tools/golang/xenlight/Makefile
> @@ -7,20 +7,21 @@ GOCODE_DIR ?= $(prefix)/share/gocode/
>  GOXL_PKG_DIR = /src/$(XEN_GOCODE_URL)/xenlight/
>  GOXL_INSTALL_DIR = $(GOCODE_DIR)$(GOXL_PKG_DIR)
>  
> -# PKGSOURCES: Files which comprise the distributed source package
> -PKGSOURCES = xenlight.go
> -
>  GO ?= go
>  
>  .PHONY: all
>  all: build
>  
>  .PHONY: package
> -package: $(XEN_GOPATH)$(GOXL_PKG_DIR)$(PKGSOURCES)
> +package: $(XEN_GOPATH)$(GOXL_PKG_DIR)
>  
> -$(XEN_GOPATH)/src/$(XEN_GOCODE_URL)/xenlight/$(PKGSOURCES): $(PKGSOURCES)
> +$(XEN_GOPATH)/src/$(XEN_GOCODE_URL)/xenlight/: %.gen.go

I was expecting you to change this if you sent a v3. :-)

I can still change it on check-in, but if for some reason there's a v4,
please make the change before resending.  Thanks. :-)

 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to