Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005903OCamlOCaml typingpublic2013-01-23 19:032014-09-26 00:42
Assigned To 
PlatformOSOS Version
Product Version 
Target Version4.02.2+devFixed in Version 
Summary0005903: integrate unused-variable (and other unused-*) warnings with ordinary type-error messages
DescriptionI think it would be preferable if unused-variable warnings appeared in
the same order and interspersed with ordinary type-error messages,
rather than all appearing after the ordinary type errors. They
sometimes provide information that is helpful in resolving type
errors. And, this would allow one to focus on one piece of code and
resolve errors in it at the same time and move on, rather than having
to jump back to a piece of code that you thought had passed already
the type checker.

TagsNo tags attached.
Attached Files

- Relationships
parent of 0006580resolvedgarrigue Confusing errors / lack of errors with labelled arguments 

-  Notes
frisch (developer)
2013-01-24 07:20

Warnings on unused stuff need to wait until type-checking is done, so the only solution I can see is to keep all warnings in a buffer, and sort them by location before displaying them (and be careful to do that even in case of type error). If someone wants to propose a patch...
Boris Yakobowski (reporter)
2013-01-24 11:27

I'm not convinced that this would be useful. Some warnings used to be intermingled with errors, and it was quite painful to skip through them before reaching the real error. In particular, when you're developing new code, warnings for unused things are bound to happen (partially written functions, functions not called yet, etc), and I clearly do not want to see them before a typing error.
frisch (developer)
2013-01-24 11:35

> I clearly do not want to see them before a typing error.

Oh, don't worry I don't think there is a plan to do that. Currently the warnings require the whole source to be type-checked (because they are no longer done syntactically on the Parsetree), but the type-checker stops at the first error. In some cases, it might be possible to detect before the end of the type-checking that some stuffs are definitely unused (and so be able to report it even in case of a type-error later), but this is quite difficult to do.

My understanding of the feature wish was that those unused-stuff warnings should appear "between" other "warnings turned into errors", not real type errors.

- Issue History
Date Modified Username Field Change
2013-01-23 19:03 sweeks New Issue
2013-01-24 07:20 frisch Note Added: 0008790
2013-01-24 11:27 Boris Yakobowski Note Added: 0008792
2013-01-24 11:35 frisch Note Added: 0008793
2013-06-19 20:42 doligez Severity minor => tweak
2013-06-19 20:42 doligez Status new => acknowledged
2013-06-19 20:42 doligez Target Version => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-16 20:45 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-22 21:59 doligez Target Version undecided => 4.02.2+dev
2014-09-26 00:42 garrigue Relationship added parent of 0006580

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker