Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: William Smith <bills@emu-bark.com>
Cc: Caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] modified error messages for ocamlc
Date: Sun, 21 Apr 2013 09:37:28 +0200	[thread overview]
Message-ID: <CAPFanBG_A1MujHpwm-Tsx8X9WwV0261Yumv5kxekGPKCqBi_Zg@mail.gmail.com> (raw)
In-Reply-To: <51702200.1050806@emu-bark.com>

One use case would be supporting other editors in an easier way. I
just tried OCaml with Geany, and apparently the people that wrote
Geany's OCaml mode didn't bother with a custom error regexp parser. If
we had a command-line option to the compiler to produce gnu-standard
error messages, that would be a non-issue.

I think a patch affecting the error and warning-printing functions of
the Location module (parsing/location.ml) should be a very satisfying
first step (what kind of errors are you thinking about that aren't
handled by these functions?). I'm considering writing such a patch.

On Thu, Apr 18, 2013 at 6:40 PM, William Smith <bills@emu-bark.com> wrote:
>> File "multilineError.ml", line 2, character 0-line 4, character 1:
>
>> This added info is great, but if you change the format, then please take
>> advantage of this opportunity to make use a more standard format so that
>> other tools can recognize those messages without extra work.
>
>> E.g:
>
>> multilineError.ml:2.0-4.1: Warning 8: this pattern-matching is not
>> exhaustive.
>
>
>>        Stefan
>
> This is harder than it looks because there are about a dozen places in the
> code where OCaml creates error messages.  They're spread out amongst all of
> the tools.
>
> I believe I found them all, but each one requires careful work to avoid
> breaking things.   So far, I've only changed the one in ocamlc.  After
> finding them, I'll also need to learn how to trigger each of them to even
> test the change.
>
> That's why I don't want to do it unless it's really useful to people.
>
> I don't use emacs right now so I don't know how to test that part of the
> system.  Will using the standard Gnu error format be ok with what Daniel
> Bünzli was concerned about?
>
> Bill
>

  reply	other threads:[~2013-04-21  7:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 16:40 William Smith
2013-04-21  7:37 ` Gabriel Scherer [this message]
2013-04-21 10:53   ` Daniel Bünzli
2013-04-21 11:28     ` Gabriel Scherer
  -- strict thread matches above, loose matches on Subject: below --
2013-04-14 15:20 William Smith
2013-04-14 16:25 ` Daniel Bünzli
2013-04-14 17:06   ` Gabriel Scherer
2013-04-14 17:57     ` Daniel Bünzli
2013-04-14 18:19       ` Jonathan Protzenko
2013-04-14 19:18         ` Daniel Bünzli
2013-04-15 15:37   ` Jacques Le Normand
2013-04-15  6:26 ` Raphaël Proust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPFanBG_A1MujHpwm-Tsx8X9WwV0261Yumv5kxekGPKCqBi_Zg@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=bills@emu-bark.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox