[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] jbuilder building locally with mirage repos


  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anil Madhavapeddy <anil@xxxxxxxxxx>
  • Date: Wed, 24 May 2017 16:12:45 +0100
  • Cc: Jeremie Dimino <jdimino@xxxxxxxxxxxxxx>
  • Delivery-date: Wed, 24 May 2017 15:13:08 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=recoil.org; h=from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; q=dns; s=selector1; b=bsEH461Zye+9r5bgIS YQZFhR6sPZOoOUfBr3WvYZhoOIBTtkGlitt05B9YH6JxF5jSpo7uw3kA7Skj28uB a4XyvtuQpAg8jQOGh/ZmfFPTwwdur3Xl6Moj+75RMtGVwnCosECLvj5iK76lYiHa ajMSEgIOXXdZOX3N5Hz5ODz9Y=
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

Greetings,

As we've been porting to libs to jbuilder, I wanted to try out one of its new 
features that only comes with having more libraries ported: you can simply drop 
in a group of separate repositories into a single directory, and call "jbuilder 
build" at the toplevel directory to build them all in one go without requiring 
OPAM at all.

This has several benefits: for local development you can make changes across 
multiple repositories, and still rebuild and test without having to tediously 
'opam pin' and 'opam update' all the time.  Once you are ready with your 
changes, you simply git commit each individual repository as normal, and 
release with topkg.

I've tried this out on the mirage-device/kv/clock/fs group of repositories with 
some success. If you want to try it, first you need some to clone the jbuilder 
ports:

mkdir mybuild
cd mybuild
git clone -b jbuilder git://github.com/avsm/mirage-fs
git clone -b jbuilder git://github.com/avsm/mirage-fs-unix
git clone -b jbuilder git://github.com/avsm/mirage-clock
git clone -b jbuilder git://github.com/avsm/mirage-device
git clone -b jbuilder git://github.com/avsm/mirage-kv
jbuilder build
jbuilder runtest

Once you do this, all the individual libraries build and test in one batch. If 
you modify any of the individual libraries, they rebuild just the pieces that 
are needed. You can use external OPAM packages as normal (you will need to 
install a few too get the above example to work -- an exercise for the reader 
).  Tests across repositories can be built and run as well.

I think this feature is pretty incredible -- it's an order of magnitude faster 
for local development, and the rules are also quite simple.  Mirage-clock-unix 
requires some review as it has -freestanding variants, so I am not in a rush to 
merge the Jbuilder PRs, but overall I think this definitely the right 
direction.  All the META files are autogenerated, and topkg works fine.

I'll cross post this to https://github.com/mirage/mirage/issues/818 as well, 
but I was very happy with this result and wanted to share it :)

-Anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.