From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2VIeA8K010736 for ; Sat, 31 Mar 2012 20:40:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAHBOd09QRFuw/2dsb2JhbABFuH6BB4IJAQEFOk8LGBwSFCiIQQe5Y4VNiCuCQWMElWCQMIJo X-IronPort-AV: E=Sophos;i="4.75,349,1330902000"; d="scan'208";a="138501046" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 31 Mar 2012 20:40:04 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.72) (envelope-from ) id 1SE3DX-000499-U4 for caml-list@inria.fr; Sat, 31 Mar 2012 19:40:03 +0100 Date: Sat, 31 Mar 2012 19:40:03 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20120331184003.GA15870@annexia.org> References: <20120322114710.GA21740@annexia.org> <4F6B206D.6030103@frisch.fr> <20120322164233.GB21740@annexia.org> <4F6B5DDB.1040800@laposte.net> <20120322201208.GC21740@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120322201208.GC21740@annexia.org> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Native dynlink and reloading modules On Thu, Mar 22, 2012 at 08:12:08PM +0000, Richard W.M. Jones wrote: > On Thu, Mar 22, 2012 at 06:14:03PM +0100, Pierre Chambart wrote: > > On 03/22/2012 05:42 PM, Richard W.M. Jones wrote: > > > Any ideas on how best to go about this? Note that the whenjobs jobs > > > script is intentionally a Turing-complete OCaml program, so converting > > > it to another format is probably not going to be practical. > > > > > I did not really read your code, but it seams to me that you are doing > > the compilation in your tool. > > So you can choose the name of the module. Isn't it possible to change > > the name of the file each > > time you compile/reload it ? > > Yes, I guess something involving -pack to pack all the files into > a randomly-named submodule, could be the way to go. Just to follow up on this. I implemented this by packing all my files into a randomly-named module. ie. My files are compiled using the -pack/-for-pack options as submodules of 'Jobs__