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 23BC17EE7D for ; Mon, 1 Jun 2015 23:52:29 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jwatzman@fb.com) identity=pra; client-ip=67.231.153.30; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="prvs=3594aa0bc9=jwatzman@fb.com"; x-sender="jwatzman@fb.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of prvs=3594aa0bc9=jwatzman@fb.com designates 67.231.153.30 as permitted sender) identity=mailfrom; client-ip=67.231.153.30; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="prvs=3594aa0bc9=jwatzman@fb.com"; x-sender="prvs=3594aa0bc9=jwatzman@fb.com"; 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@mx0a-00082601.pphosted.com) identity=helo; client-ip=67.231.153.30; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="prvs=3594aa0bc9=jwatzman@fb.com"; x-sender="postmaster@mx0a-00082601.pphosted.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BhAQAl02xVnB6Z50Ncg2ReBsA5h24QAQEBAQEBAREBAQEBAQgLCQkhLoQkBAE6BgEBOAQNAT5CJwSIOAgNs1wBAYVTAQWfJwEBAQEXAgSTZ4EWl0ueGIQbb4FGgQEBAQE X-IPAS-Result: A0BhAQAl02xVnB6Z50Ncg2ReBsA5h24QAQEBAQEBAREBAQEBAQgLCQkhLoQkBAE6BgEBOAQNAT5CJwSIOAgNs1wBAYVTAQWfJwEBAQEXAgSTZ4EWl0ueGIQbb4FGgQEBAQE X-IronPort-AV: E=Sophos;i="5.13,535,1427752800"; d="scan'208";a="132946548" Received: from mx0b-00082601.pphosted.com (HELO mx0a-00082601.pphosted.com) ([67.231.153.30]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Jun 2015 23:52:27 +0200 Received: from pps.filterd (m0004003 [127.0.0.1]) by mx0b-00082601.pphosted.com (8.14.5/8.14.5) with SMTP id t51LnKdp031243 for ; Mon, 1 Jun 2015 14:52:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=LMWRZ2qiA1xgak52gFLgA72hfUpRkfJZhx++33flNwA=; b=fwMR9yg8ppXi98s0+npBZyl0+RUQXSVhw/+2y/VGrjKfHmeCegp9ojTPvkQtTq6qoRpy pksHN/23oGi285CQCOTR5cYggvbQFrlgOzkEPBf2dLrELDJ7n0bLwYtvE47/1JXdvFjI sNsJf30t8H8xrUKwu0l9ockI4yDyxhi9Kn0= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 1urxvj06vy-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Mon, 01 Jun 2015 14:52:25 -0700 Received: from PRN-MBX02-2.TheFacebook.com ([169.254.5.82]) by PRN-CHUB10.TheFacebook.com ([fe80::c983:d64f:e422:461d%12]) with mapi id 14.03.0195.001; Mon, 1 Jun 2015 14:52:24 -0700 From: Josh Watzman To: "caml-list@inria.fr" Thread-Topic: "Inconsistent assumptions" when moving files across subdirectories Thread-Index: AQHQnLU93upsY55oAUqSbBlxEc580w== Date: Mon, 1 Jun 2015 21:52:22 +0000 Message-ID: <7BA16901-A2D2-48DE-9DA4-065DF74D5B90@fb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.52.123] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-06-01_11:2015-05-29,2015-06-01,1970-01-01 signatures=0 Subject: [Caml-list] "Inconsistent assumptions" when moving files across subdirectories I've noticed that it's pretty easy to confuse ocamlc/ocamlopt when moving a= module across subdirectories. Here's an example, the most minimized repro = I could get; it uses ocamlbuild, but a similar problem happens if you use O= CamlMakefile and I assume other build systems. https://gist.github.com/jwat= zman/9979951afb5b87304c18 -- running that will consistently terminate with = the dreaded > Error: Files main.cmx and a/quux.cmx > make inconsistent assumptions over interface Quux (The script flips the quux module back and forth twice, but that's only to = exhibit the problem on both 4.01 and 4.02; you can get the same problem wit= h only one move of quux.ml, but which way you need to move it depends on wh= ich version of ocaml you're using.) A clean build will of course resolve the problem, but that's quite annoying= to have to go broadcast to a large team, particularly when the build may t= ake many minutes, and when this problem is specific to the OCaml parts of o= ur system (a humongous C++ codebase never requires a clean rebuild). Renami= ng a module across subdirectories doesn't seem like that uncommon of an ope= ration. The root problem seems to be that ocamlc/ocamlopt are picking up build arti= facts by directory only, and can't be explicitly told which artifacts to pi= ck up, and so they are picking up the "wrong" quux.cmi/cmx left over in a b= uild directory, which ocamlbuild should be cleaning up. Is that right? Is t= here any way to tell ocamlc/ocamlopt not to do things by directory, but to = be more explicit, for the usages of build systems? Not working around this limitation of ocamlc/ocamlopt seems like a bug in o= camlbuild, no? I'm a bit surprised by it though, given that I've found the = same problem in other build systems -- have other folks not run into this? = How do other teams deal with this, trying to avoid clean builds? Thanks! Josh Watzman