Open hendriktews opened 7 years ago
Hi @hendriktews, Thanks for recapitulating all this!
The mechanism to configure warnings should work for both, background compilation and coqtop invocation.
Agreed.
We could insert an Set Warnings command before we process the scripting buffer in coqtop.
Agreed.
[...] There seems to be a hierarchy in the warnings, but there is no documentation about it. It would be nice to have a list of all warnings and the ones that are enabled by default, but I cannot find either.
I didn't find much doc on the warnings in the current version of Coq refman, but it seems that the list of all warnings can be found by searching for the "CWarnings.create" pattern in the sources (e.g. with this link).
It would surely be impressive to have radio buttons for all the warnings, but do we need this?
Anyway that'd be indeed impressive! But maybe such a feature would be useful enough if there were radio buttons just for "warnings categories", not for each individual warning?
Is there a way to configure warnings in _CoqProject that works with other tools?
I think this is related to #113 as well as to coqbug 5109, which itself mentions PR coq/coq#305 ...
Best wishes! Erik
coq_makefile accepts option "-arg foo" which pass option foo to coqc and coqtop, and IIRC I I implemented -arg recognition for pg. So I guess it should already work. I can't test right now but I will later today. There may be issues with options with complex syntax.
@Matafou Indeed, this could work; it would be nice to have a configuration system consistent with CoqIDE. That being said, _CoqProject is so horrendous that this could be another reason to push for a better format.
Someone is recoding coq_makefile currently it may be time to list what you don't like with _CoqProject.
I saw Enrico's email. I'm hoping to chat about this at POPL. My issue with _CoqProject is the lack of semantics (It's just a bunch of command line arguments, but the syntax isn't specified, as far as I can tell)
Maybe a more precise characterization is that the original format was nice and simple (sequences of -optname optarg1 … optargn
), but now that you can add paths you run into problems with quotes and escaping.
Here is the list of warnings in 8.6 (relying on the pattern CWarnings.create). I am not sure, a menu with 24 submenus and 71 tick boxes in total is useful, although it would be a nice little hack to generate the necessary emacs lisp code automatically...
24 categories with 71 warnings in total
category automation: 3 warnings
category bytecode-compiler: 1 warnings
category declmode: 2 warnings
category deprecated: 14 warnings
category extraction: 8 warnings
category filesystem: 7 warnings
category fixpoints: 1 warnings
category funind: 3 warnings
category implicits: 2 warnings
category loadpath: 1 warnings
category ltac: 3 warnings
category native-compiler: 3 warnings
category numbers: 1 warnings
category option: 1 warnings
category parsing: 8 warnings
category pedantic: 1 warnings
category record: 1 warnings
category records: 1 warnings
category require: 1 warnings
category schemes: 1 warnings
category scope: 1 warnings
category tactics: 2 warnings
category typechecker: 3 warnings
category vernacular: 2 warnings
I open this issue to foster the discussion about how to configure warnings in 8.6. If you have an opinion, please leave a comment.