Bug 142205 - [batch][options] -deprecation option is not on by default, whereas the help message says so
Summary: [batch][options] -deprecation option is not on by default, whereas the help m...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 09:15 EDT by Maxime Daniel CLA
Modified: 2006-12-12 10:04 EST (History)
0 users

See Also:


Attachments
Proposed fix (1.03 KB, patch)
2006-11-27 23:42 EST, Olivier Thomann CLA
no flags Details | Diff
Updated regression tests (1.18 KB, patch)
2006-11-27 23:45 EST, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2006-05-17 09:15:16 EDT
3.2 RC2
The batch compiler help message reads:
...
-deprecation      + deprecation outside deprecated code

which means that adding that option is neutral (on by default). But this is not the case. As documented in the help system, -deprecation is equivalent to -warn:deprecation, in effect disabling other warnings like assertIdentifier, charConcat, etc.
Comment 1 Olivier Thomann CLA 2006-05-17 09:18:08 EDT
-deprecation should not have any effect on other warnings.
This would be a bug.
Comment 2 Olivier Thomann CLA 2006-05-17 09:22:06 EDT
I will revisit the warning settings post 3.2.
Comment 3 Maxime Daniel CLA 2006-05-17 10:40:47 EDT
(In reply to comment #1)
> -deprecation should not have any effect on other warnings.
> This would be a bug.
> 
If we want to follow javac -deprecation semantics, -deprecation should be an alias for -warn:+deprecation indeed.
Comment 4 Olivier Thomann CLA 2006-05-17 10:57:25 EDT
This is right. But I think we can revisit completely the way we set the warnings to be able to combine + and - inside the same warn option.
There is another PR for this.
Comment 5 Olivier Thomann CLA 2006-11-27 23:41:53 EST
This is off only if the default warning level is overriden.
So this works as designed. I will add a line in the help of the batch compiler.
Comment 6 Olivier Thomann CLA 2006-11-27 23:42:42 EST
Created attachment 54608 [details]
Proposed fix
Comment 7 Olivier Thomann CLA 2006-11-27 23:45:33 EST
Created attachment 54609 [details]
Updated regression tests
Comment 8 Olivier Thomann CLA 2006-11-28 12:29:13 EST
If your concern is about -deprecation being equivalent to -warn:deprecation instead of -warn:+deprecation, I'll update the help documentation in addition to the patches already submitted.
Let me know if this is ok for you.
Comment 9 Olivier Thomann CLA 2006-11-28 12:35:12 EST
Released for 3.3M4.
Please reopen if the new help contents is still unclear.
Comment 10 Maxime Daniel CLA 2006-11-29 02:33:28 EST
Let's step back.
From the tests I've just made a minute ago, 3.3 M4 equates -deprecation to -warn:+deprecation. I believe it was not the case for the version I opened the bug for, but that it equated -deprecation to -warn:deprecation, hence my initial request.

If this is the current behavior, then it is aligned with the intuitive definition for default warnings, and the following should be enough for the documentation:
    -deprecation     + deprecation outside deprecated code
or if you want to be more explicit:
    -deprecation     + deprecation outside deprecated code (equivalent to
                       -warn:+deprecation)

The help system contents should also be aligned with the current behavior as well. ('Compiling Java code' article, which says that -deprecation is equivalent to -warn:deprecation.)

In other words, given the current behavior, the help message should be reverted, and the the help contents should be aligned on the help message.

Does that make sense?
Comment 11 Olivier Thomann CLA 2006-11-29 07:13:30 EST
Did you check the help contents before reopening?
I modified it to align it with -warn:+deprecation.
I can change the printUsage of the batch compiler to be the one you mentionned if you believe this is clearer.
Comment 12 Maxime Daniel CLA 2006-11-29 08:31:08 EST
(In reply to comment #11)
> Did you check the help contents before reopening?
No, at least not the right contents (went to the help system, not to the files in HEAD). Sorry for that.
> I modified it to align it with -warn:+deprecation.
> I can change the printUsage of the batch compiler to be the one you mentionned
> if you believe this is clearer.
Yes, please.
Comment 13 Olivier Thomann CLA 2006-11-29 12:12:26 EST
Released for 3.3M4.
To verify check the help contents + the print usage of the batch compiler.
Comment 14 Frederic Fusier CLA 2006-12-12 10:04:34 EST
Verified for 3.3 M4 using build I20061212-0010.