Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Nick Rosbrook <rosbrookn@gmail.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: Nick Rosbrook <rosbrookn@ainfosec.com>,
	Xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
	Ian Jackson <ian.jackson@citrix.com>
Subject: Re: [PATCH 3/5] libxl: Generate golang bindings in libxl Makefile
Date: Sat, 23 May 2020 13:00:37 -0400
Message-ID: <CAEBZRScr-6Lt29tHFNgOBmZhXBW0oBB-NcoqTBi9xr5GgQaZVQ@mail.gmail.com> (raw)
In-Reply-To: <20200522161240.3748320-4-george.dunlap@citrix.com>

> The generated golang bindings (types.gen.go and helpers.gen.go) are
> left checked in so that they can be fetched from xenbits using the
> golang tooling.  This means that they must be updated whenever
> libxl_types.idl (or other dependencies) are updated.  However, the
> golang bindings are only built optionally; we can't assume that anyone
> updating libxl_types.idl will also descend into the tools/golang tree
> to re-generate the bindings.
>
> Fix this by re-generating the golang bindings from the libxl Makefile
> when the IDL dependencies are updated, so that anyone who updates
> libxl_types.idl will also end up updating the golang generated files
> as well.
>
>  - Make a variable for the generated files, and a target in
>    xenlight/Makefile which will only re-generate the files.
>
>  - Add a target in libxl/Makefile to call external idl generation
>    targets (currently only golang).
>
> For ease of testing, also add a specific target in libxl/Makefile just
> to check and update files generated from the IDL.
>
> This does mean that there are two potential paths for generating the
> files during a parallel build; but that shouldn't be an issue, since
> tools/golang/xenlight should never be built until after tools/libxl
> has completed building anyway.
>
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>

For the golang side:

Reviewed-by: Nick Rosbrook <rosbrookn@ainfosec.com>


  reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 16:12 [PATCH 0/5] Golang build fixes George Dunlap
2020-05-22 16:12 ` [PATCH 1/5] golang: Add a minimum go version to go.mod George Dunlap
2020-05-23 16:29   ` Nick Rosbrook
2020-05-22 16:12 ` [PATCH 2/5] golang: Add a variable for the libxl source directory George Dunlap
2020-05-23 16:32   ` Nick Rosbrook
2020-05-26 13:41   ` Ian Jackson
2020-05-22 16:12 ` [PATCH 3/5] libxl: Generate golang bindings in libxl Makefile George Dunlap
2020-05-23 17:00   ` Nick Rosbrook [this message]
2020-05-26 13:53   ` Ian Jackson
2020-05-26 14:56     ` George Dunlap
2020-05-26 16:57       ` Ian Jackson
2020-05-22 16:12 ` [PATCH 4/5] golang/xenlight: Use XEN_PKG_DIR variable rather than open-coding George Dunlap
2020-05-23 16:40   ` Nick Rosbrook
2020-05-23 16:48     ` Nick Rosbrook
2020-05-26  9:31       ` George Dunlap
2020-05-26 15:19         ` Nick Rosbrook
2020-05-26 13:58   ` Ian Jackson
2020-05-22 16:12 ` [PATCH 5/5] gitignore: Ignore golang package directory George Dunlap
2020-05-23 17:03   ` Nick Rosbrook
2020-05-26 13:54   ` Ian Jackson
2020-05-26 15:30     ` George Dunlap
2020-05-26 16:21       ` Nick Rosbrook
2020-05-26 16:33         ` George Dunlap
2020-05-26 16:59       ` Ian Jackson
2020-05-26 17:07         ` George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEBZRScr-6Lt29tHFNgOBmZhXBW0oBB-NcoqTBi9xr5GgQaZVQ@mail.gmail.com \
    --to=rosbrookn@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=rosbrookn@ainfosec.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git