From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 738657FA1F for ; Fri, 11 Jul 2014 16:36:46 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of whitequark@whitequark.org) identity=pra; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of whitequark@whitequark.org designates 176.58.103.125 as permitted sender) identity=mailfrom; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="whitequark@whitequark.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.whitequark.org) identity=helo; client-ip=176.58.103.125; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="whitequark@whitequark.org"; x-sender="postmaster@mail.whitequark.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4FAG71v1OwOmd9/2dsb2JhbABZhlpRqREBAQEBAQEGgTqadAGBIXWEAwEBBSMPAQVBEAQHGAICJgICLCsGEwiIPq0/mH4XgSyET4NkhFyBDgeCd4FMAQSKUowZmDaDSTg X-IPAS-Result: Ag4FAG71v1OwOmd9/2dsb2JhbABZhlpRqREBAQEBAQEGgTqadAGBIXWEAwEBBSMPAQVBEAQHGAICJgICLCsGEwiIPq0/mH4XgSyET4NkhFyBDgeCd4FMAQSKUowZmDaDSTg X-IronPort-AV: E=Sophos;i="5.01,643,1400018400"; d="scan'208";a="71102089" Received: from fehu.whitequark.org (HELO mail.whitequark.org) ([176.58.103.125]) by mail3-smtp-sop.national.inria.fr with ESMTP; 11 Jul 2014 16:36:43 +0200 Received: by mail.whitequark.org (Postfix, from userid 33) id 9A3254E5B0; Fri, 11 Jul 2014 14:36:37 +0000 (UTC) To: =?UTF-8?Q?Daniel_B=C3=BCnzli?= X-PHP-Originating-Script: 1000:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 11 Jul 2014 18:36:37 +0400 From: Peter Zotov Cc: Benjamin Canou , caml-list@inria.fr In-Reply-To: <1F6CA9F698BB4509800C3FD280CE0ACB@erratique.ch> References: <53BFE73E.6060106@gmail.com> <1F6CA9F698BB4509800C3FD280CE0ACB@erratique.ch> Message-ID: <69c5d809b89ebdc663eb45a2b422718c@whitequark.org> X-Sender: whitequark@whitequark.org User-Agent: Roundcube Webmail/1.0.1 Subject: Re: [Caml-list] proposal for finding, loading and composing ppx preprocessors On 2014-07-11 18:21, Daniel Bünzli wrote: > Le vendredi, 11 juillet 2014 à 14:31, Benjamin Canou a écrit : >> What do you think ? > If I understand correctly this is a ppx for selectively using ppxs > over a file. Bonus points for the higher-order ppx. > > Since apparently we have to deal with this crap until we actually get > something decent for static meta programming in this language, > wouldn't it be easier to just define a standard annotation as you > suggest, and then have some kind of "ppxdep" tool that just spits you > the flags you will have to put on the command line in order to be able > to compile it ? This would require extensive changes to buildsystems (or just to ocamldep; that doesn't make it easier), which, as I understand, this proposal is aiming to avoid. Personally I don't see anything wrong with just supplying -package to ocamlfind c invocation, directly, via _tags, via _oasis (and possibly _tags too, for more finely grained control) or whatever build system are you using. Alain Frisch suggested that constant forking might slow down builds, and suggested some kind of a frontend that would automatically link (not even dynlink) a compound ppx to make builds faster, especially on Windows. I wonder if we should just get rid of a Unix-like build pipeline entirely, and just make a hybrid frontend-buildsystem that would use compiler-libs and never execute an external OCaml process. This would make builds even faster and it's the logical conclusion of Alain's suggestion. -- Peter Zotov sip:whitequark@sipnet.ru