History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3794
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Zhuravlev
Reporter: Alexey Makhmutov
Votes: 0
Watchers: 1
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Cannot compile single class if there are unused imports in referenced classes

Created: 11 Jan 06 13:05   Updated: 30 Oct 06 18:50
Component/s: Compiling Project
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive Sample.zip (3 kb)

Environment: Windows 2000, jdk 1.4.1_05

Build: 4,101
Severity: High


 Description  « Hide
It's impossible to compile single class if there are unused imports in this file (or other referenced classes). Option 'Honor dependencies on "Compile" command" is turned on. Simple test case:

file demo\a\A:
package demo.a;
import demo.b;
public class A
{}

file demo\b\B:
package demo.b;
public class B
{}

and we have clean output directory (i.e. there are not B.class in output directory).
In this case we are trying to comple A and get error from compiler "package demo.b does not exist".

Sample project is attached.



 All   Comments   Work Log   Change History      Sort Order:
Eugene Zhuravlev - 30 Oct 06 18:44
Strictly speaking, the problem exists, but in my opinion it is really minor. The case you describe is rather synthetic. If B class was really used by A, then it would compile together with A. If class A really does not use B, then the import should be removed. If you need to compile all classes, you'd rather invoke the 'make' or 'rebuild' action.