|Anonymous | Login | Signup for a new account||2013-05-22 23:58 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005903||OCaml||OCaml typing||public||2013-01-23 19:03||2013-01-24 11:35|
|Target Version||Fixed in Version|
|Summary||0005903: integrate unused-variable (and other unused-*) warnings with ordinary type-error messages|
|Description||I 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.
|Tags||No tags attached.|
|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)
|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.|
> 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.
|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|
|Copyright © 2000 - 2011 MantisBT Group|