Bug 172423 - [compiler][batch][options] introduce a javac compatibility mode
Summary: [compiler][batch][options] introduce a javac compatibility mode
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-01 01:55 EST by Maxime Daniel CLA
Modified: 2009-08-30 02:21 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2007-02-01 01:55:45 EST
Fup on bug 161996. The argument is that some users want to have ecj behave like javac when given javac compatible options. This is not always the case as of today  (see an example in bug 161996).
We need to drive an extensive review of what this could mean.

I would contend that different levels of javac behave differently, which may drive a need for a nuance here. Minimum feature would be to declare/document the compatibility with a given, well-chosen level of javac.

The latest idea that came up to my mind about the way to tell ecj to consider the command line to be in javac compatibility mode without adding an option (which would defeat the whole purpose of the feature by definition) would be to leverage the command name itself. Say have ecj be named ecj_compat or any other distinct name when it should behave in compatibility mode. This is superior to alternatives that involve black magic behind the scenes (environment variables, .rc files) in that it does not have to be global at any time (even if such techniques remain valuable to provide defaults and could be considered separately). And changing the name is already something people do when using ecj instead of javac. (Note: to remain on the safe side, ecj should be capable to associate its being called as javac to javac compatibility mode - this mapping possibly overriden at the environment level for those who would want to have ecj called as javac and behaving as ecj.)
Comment 1 Maxime Daniel CLA 2007-02-01 10:41:48 EST
We (Olivier and I) believe that this needs some thinking, and that the solution we come up with is due to bring more changes that we'd wish at this stage of the release cycle.
Comment 2 Philipe Mulet CLA 2007-02-01 12:14:25 EST
I would rather see our command line being a superset of javac's, and provide compatible mapping by default (with some heuristics).
Comment 3 Denis Roy CLA 2009-08-30 02:21:56 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.