caml-list - the Caml user's mailing list
 help / Atom feed
* [Caml-list] Deprecating -annot
@ 2018-11-08  9:16 Nicolás Ojeda Bär
  2018-11-09  9:53 ` Boris Yakobowski
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolás Ojeda Bär @ 2018-11-08  9:16 UTC (permalink / raw)
  To: OCaml Mailing List

Dear caml-list,

In the last caml-devel meeting it was decided to deprecate .annot
files and the -annot switch. This is currently being worked on at
https://github.com/ocaml/ocaml/pull/2141.

Note this does NOT mean that .annot files will be going away anytime
soon. Rather it means that technical decisions will be taken with the
understanding that it is a legacy functionality and it may go away at
some point in the future.

The main reason for the deprecation is that it is superseded by
.cmt-based infrastructure (as exploited by e.g. merlin, ocp-index,
etc).

To have a more accurate picture of the impact of the deprecation and
eventual removal of this feature, we would love to hear from the
community if you are still using .annot files and, if yes, whether
migrating to a .cmt-based solution would present a problem.

Thanks!

Best wishes,
Nicolás

-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Deprecating -annot
  2018-11-08  9:16 [Caml-list] Deprecating -annot Nicolás Ojeda Bär
@ 2018-11-09  9:53 ` Boris Yakobowski
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Yakobowski @ 2018-11-09  9:53 UTC (permalink / raw)
  To: nicolas.ojeda.bar; +Cc: The Caml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]

Hi,

On Thu, Nov 8, 2018 at 10:16 AM Nicolás Ojeda Bär <
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.( = )  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 = int coming from the context. So
this message must not be understood as a real suggestion to keep .annot
file in the end :)

-- 
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

[-- Attachment #2: Type: text/html, Size: 1685 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08  9:16 [Caml-list] Deprecating -annot Nicolás Ojeda Bär
2018-11-09  9:53 ` Boris Yakobowski

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox