[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology] Re: Eclipse just seems wrong
|
"Bob Hays, Computer Geek" <purplehayz@xxxxxxxxxxxxx> wrote in message
news:BB8466DF.FC48%purplehayz@xxxxxxxxxxxxxxxx
> The Java spec says that the directory structure and package structures are
> mirrors of each other - if you're using package statements that don't
match
> the file structure then you're asking for problems when porting to other
> Java compilers, not just IDEs.
There is no such statement in any copy of the spec I've ever read.
Section 7.2 says the following:
===========
Each host determines how packages, compilation units, and subpackages are
created and stored, and which compilation units are observable ($7.3) in a
particular compilation.
The observability of compilation units in turn determines which packages are
observable, and which packages are in scope.
The packages may be stored in a local file system in simple implementations
of the Java platform. Other implementations may use a distributed file
system or some form of database to store source and/or binary code.
===========
The following section, 7.2.1 has an example where there are source files and
class files in a parallel structure, but it also shows simple directories
with peoples initials. Clearly, the class files need to follow the package
hierarchy, but the source files can be arranged how the user likes. I.e. my
file structure is not part of the java platform!
Eclipse is broken if it does not read the package statement at the top of my
source file and use that to control what part of the namespace it is visible
in!
As it writes output files, it needs to write those out to a package
hierarchy organized directory structure, or in some other way, as the spec
suggests for putting compilation units into databases.
With its current behavior, I can not accept it as meeting the spec.
The ANT developers used to make this same nonsensical requirement. They
finally figured out what the spec really says and fixed ANT.
They argued that it helped optimize builds. The problem is that as soon as
you are building against a source code control directory structure, file
dates and times most be ignored, and everything recompiled every time.
Otherwise, when I am trying to find out how far back a bug existed,
everytime I get an older version of a source file, I don't get a recompile
because the source is older in time than the .class file. So, you're better
off just recompiling everytime, because you can't count on people having the
correct settings or the correct time on their computers compared to the
possibly shared file systems they might be building against.
Gregg