From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0112ABBFB for ; Mon, 20 Jun 2005 03:23:05 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5K1N43F013540 for ; Mon, 20 Jun 2005 03:23:04 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA02141 for ; Mon, 20 Jun 2005 03:23:04 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5K1N1hg011043 for ; Mon, 20 Jun 2005 03:23:03 +0200 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j5K1F3SU023096; Mon, 20 Jun 2005 10:15:05 +0900 (JST) Date: Mon, 20 Jun 2005 10:15:41 +0900 (JST) Message-Id: <20050620.101541.59497922.garrigue@math.nagoya-u.ac.jp> To: Tom.Hirschowitz@ens-lyon.fr Cc: caml-list@inria.fr, romain.bardou@dptinfo.ens-cachan.fr Subject: Re: [Caml-list] modifying ocaml sources From: Jacques Garrigue In-Reply-To: <17074.46980.394501.898095@gargle.gargle.HOWL> References: <17074.46980.394501.898095@gargle.gargle.HOWL> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42B61A78.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42B61A75.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ens-lyon:01 ocaml:01 compiler:01 recursive:01 dependencies:01 stdlib:01 cmo:01 toplevel:01 utils:01 config:01 compilers:01 compiler:01 dependencies:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: From: Tom Hirschowitz > We are trying to modify the ocaml compiler in order to have it verify > the well foundedness of recursive module definitions, and have a > question for the long standing ocaml source hackers. Interesting endeavour. Of course I hope that you can handle my pet case: http://www.math.nagoya-u.ac.jp/~garrigue/papers/mixmod5.ml.txt > >From early experiments, it seems that the dependencies in the various > .depend files are insufficient. For example, try to modify the version > string, say "3.08.3", in stdlib/sys.cmo, and make the world. Launch > the new toplevel; nothing has changed. How do people deal with this > issue? In the cases we have, cleaning up the executables before making > the world again is enough. Is it in general? There are indeed a few things that are not redone automatically. But of course make clean; make world should always solve the problem; except when you have changed some internal data and you need to bootstrap. The kinds of problem I see frequently are: * after modifying the standard library implementation, need to relink everything. Dirty workaround: touch utils/config.ml; this will force to relink the compilers, but not all tools. * any change in the interface of a standard library module used somewhere in the compiler requires recompilation. Generally you're better off recompiling everything than trying to track the dependencies by hand. * after changes in the compiler, ocamlbrowser compilation breaks sometimes. (cd otherlibs/labltk/browser; make clean) solves it. The dependencies are not all that clever because: * some cases are really cyclic (eg ./ocamlc and the standard library clearly depend on each other) * having too many dependencies automatically enforced can be a pain. (For instance, on slow machines I sometimes disable the rule forcing ocamlc.opt and ocamlopt.opt to be recompiled from scratch everytime ocamlopt has changed.) Jacques Garrigue