From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id C3CE45D4 for ; Fri, 9 Nov 2018 09:53:28 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,483,1534802400"; d="scan'208,217";a="354894538" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 09 Nov 2018 10:53:26 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id 6E6B282534; Fri, 9 Nov 2018 10:53:25 +0100 (CET) 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 4510C824E4 for ; Fri, 9 Nov 2018 10:53:17 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ml@yakobowski.org; spf=Pass smtp.mailfrom=cppcrazy@gmail.com; spf=None smtp.helo=postmaster@mail-oi1-f175.google.com IronPort-PHdr: =?us-ascii?q?9a23=3A/QibbhKOtxFs2CHDTdmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgRL/7xwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgpp?= =?us-ascii?q?POT1HZPZg9iq2+yo9JDffwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+?= =?us-ascii?q?RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLd?= =?us-ascii?q?QgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD?= =?us-ascii?q?8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJOUcZfVSNPAo2y?= =?us-ascii?q?YYgSAeQfIelVtJPyq0cUoBakGQWgGOHixzlVjXH2x6061OEhHBnb0QwnBdIOsW?= =?us-ascii?q?/Up8j3O6gIUuC1y7LHzTLNbvNN2jf96ZXDfxckofGIRr9xcdDeyUooFwzeiVWR?= =?us-ascii?q?p5flPzCU1ugXtGib9eVgWPuphmU6qA9xuiCiytkwhoTNnI4YyVDJ+T9kzIs0J9?= =?us-ascii?q?C0UlN3bNykHZZWqiqULZF5Qtk4TGFtoCs6yqMJuZq8fCUSzZQo3R/fa/ief4iP?= =?us-ascii?q?4xLvSf+dITlliH9neL+znRmy8U+nyu3zUsm7zkxGoTZCktnJrnwN1hrT5dabSv?= =?us-ascii?q?Zl4EutxTKC2xrQ5+xEO0w4iKvWJpw7zrItlJcesVzPHirsl0X3iK+WeF8k+u+t?= =?us-ascii?q?6+n/frrmvoecOJNuig7kM6UvmteyAes9MgcUXmib/f6w26Hk/U38WLlKlOE5kr?= =?us-ascii?q?HFsJDGIsQWvrK2DBVQ0oYn8hq/Czam0M8EnXQcN1JEeBeHj5DzNF3UIfD4C+2/?= =?us-ascii?q?g1W2nztxyfDGJO6pPpKYKHnIl7PoZvB66UNQwUw5xMp3459EC78AZvn0Xxzfrt?= =?us-ascii?q?vdWzU+KQ2vi9fuC9J30ZwFWmPHVqqdGLLbsliC4f00IOjKY5Ua7mWuY8M57uLj?= =?us-ascii?q?2Cdq0WQWerOkiN5OMCjhT6ZWZn6BaH+pue8vVGIDvw4wVuvv0QTQXjtaZnL0VK?= =?us-ascii?q?U5tGhiVNCWSLzbT4Xou4SvmT+hF8QINHFPCVeGFmjzdITCXO0DOnrLf51R1wcc?= =?us-ascii?q?XL3kcLcPkBGjsAiglehiJ+vQvyoZ7NftjYcooeLUkh42+Hp/CMHPi2w=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ByAQCtWOVbhq+nVdFkHQEBBQEHBQGBZ?= =?us-ascii?q?YM5MyeDeIEdlQOZOYgMGgcBBDQWAQMBAQIBAQEBARMBAQEICwsIKSMMgjYkAYJ?= =?us-ascii?q?gAQQBI1YFCwsEBzcCAiISAQUBHBmDIYF6CJwdPIsNgS6KIxKLaheCAIQjhUuCN?= =?us-ascii?q?4JXAokOlj4JjTWDZBiBeY51l2IPIYE5SIEufQg7MQaCNYInF4IbjAJBMAGNQwE?= =?us-ascii?q?B?= X-IPAS-Result: =?us-ascii?q?A0ByAQCtWOVbhq+nVdFkHQEBBQEHBQGBZYM5MyeDeIEdlQO?= =?us-ascii?q?ZOYgMGgcBBDQWAQMBAQIBAQEBARMBAQEICwsIKSMMgjYkAYJgAQQBI1YFCwsEB?= =?us-ascii?q?zcCAiISAQUBHBmDIYF6CJwdPIsNgS6KIxKLaheCAIQjhUuCN4JXAokOlj4JjTW?= =?us-ascii?q?DZBiBeY51l2IPIYE5SIEufQg7MQaCNYInF4IbjAJBMAGNQwEB?= X-IronPort-AV: E=Sophos;i="5.54,483,1534802400"; d="scan'208,217";a="284898017" Received: from mail-oi1-f175.google.com ([209.85.167.175]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 09 Nov 2018 10:52:48 +0100 Received: by mail-oi1-f175.google.com with SMTP id p144-v6so961036oic.12 for ; Fri, 09 Nov 2018 01:52:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8fXV3yGG2AV469A6zdgpzZlB5ukV3cwKe55ZLlEJxeE=; b=glNDFl3u80I0Klafi//zToARizOLmzc7ZRxHVvjgIi8FSSiTpUTQy/fuSmJ/ggJOEX 2I1rQTad2PAj/eUHu1cokBfARTWyvxYhn4j5OGzgBliqL0/j63sMi/VOefeKsJPI99Zl lX0zzx0S+VNSwU7HRh0zT7x/NerJYIuEZU97b05fjpNkuiqdAedY6DV2MdkvrwC83CcR 92f4nDgvRTcJ+oOKjezYwI/afTK1iwYEX1olmvwXw4bC9zwMt3Uu6NqinfD3lwnVJsHu 0ylvKtJx8+9DM0jJfPY/D/P3rn1x35H3sLxapZlo8EcOTSU3JFkVsNG9NlY/0JcjctW5 vC0A== X-Gm-Message-State: AGRZ1gKAHizR53fow+vR1FMV52i49AopYngXXneX635owaXgy6fqhVFq JNdpGLAFt3BvBdT4yN2FGSR8AnLV/R9QGz05tlsS9Q== X-Google-Smtp-Source: AJdET5e7fX/exmTTUfIz0OWzQ0TXrKCjRd/8auC7XuGylXlCLKPpHq6n0JxuLfjrgL73JXxoPqqD41Hyl2rXmd4lOOE= X-Received: by 2002:aca:e003:: with SMTP id x3-v6mr4742781oig.245.1541757166600; Fri, 09 Nov 2018 01:52:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Boris Yakobowski Date: Fri, 9 Nov 2018 10:52:36 +0100 Message-ID: To: nicolas.ojeda.bar@lexifi.com Cc: The Caml Mailing List Content-Type: multipart/alternative; boundary="0000000000003ec5e4057a38506a" Subject: Re: [Caml-list] Deprecating -annot Reply-To: Boris Yakobowski X-Loop: caml-list@inria.fr X-Sequence: 17131 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000003ec5e4057a38506a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Nov 8, 2018 at 10:16 AM Nicol=C3=A1s Ojeda B=C3=A4r < nicolas.ojeda.bar@lexifi.com> wrote: > The main reason for the deprecation is that it is superseded by > .cmt-based infrastructure (as exploited by e.g. merlin, ocp-index, > etc). > I was thinking about the good old .annot days (finally, type information in emacs!), as well as of the not-so-good-ones (generation of the .annot file that took longer than the compilation of the file). By large, .cmt files have been a improvement in my experience. That being said, there is one use of .annot files that I have not been able to port to .cmt files: finding (unsafe) uses of Pervasives.compare or Pervasives.equal in a codebase. My workflow is as follow: - generate the .annot files - grep for Pervasives.( =3D ) or Pervasives.compare with sufficient context - dismiss all calls that occur on a basic type (typically scalars) - check all remaining calls for an use on an abstract or possible-cyclic type Clearly this process is not exactly efficient, and would be much better handled by a compiler warning -- especially since the compiler would be able to notice type equalities such as t =3D int coming from the context. So this message must not be understood as a real suggestion to keep .annot file in the end :) --=20 Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list https://inbox.ocaml.org/caml-list Forum: https://discuss.ocaml.org/ Bug reports: http://caml.inria.fr/bin/caml-bugs= --0000000000003ec5e4057a38506a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On = Thu, Nov 8, 2018 at 10:16 AM Nicol=C3=A1s Ojeda B=C3=A4r <nicolas.ojeda.bar@lexif= i.com> wrote:
The main reason for the deprecation is that it is superseded by
.cmt-based infrastructure (as exploited by e.g. merlin, ocp-index,
etc).

I was thinking about the good old= .annot days (finally, type information in emacs!), as well as of the not-s= o-good-ones (generation of the .annot file that took longer than the compil= ation of the file). By large, .cmt files have been a improvement in my expe= rience.

That being said, there is one use of .= annot files that I have not been able to port to .cmt files: finding (unsaf= e) uses of Pervasives.compare or Pervasives.equal in a codebase. My workflo= w is as follow:
- generate the .annot files
- grep for = Pervasives.( =3D )=C2=A0 or Pervasives.compare with sufficient context
- dismiss all calls that occur on a basic type (typically scalars)
- check all remaining calls for an use on an abstract or possible-c= yclic type

Clearly this process is not exactly eff= icient, and would be much better handled by a compiler warning -- especiall= y since the compiler would be able to notice type equalities such as t =3D = int coming from the context. So this message must not be understood as a re= al suggestion to keep .annot file in the end :)

--0000000000003ec5e4057a38506a--