Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2002 02:54:54 GMT
From:      Jeff Dalton <jeff@aiai.ed.ac.uk>
To:        "Remco van 't Veer" <rwvtveer@xs4all.nl>, Christopher Rued <c.rued@xsb.com>
Cc:        Christopher Elkins <chrise@scardini.com>, Brad Cox <bcox@virtualschool.edu>, freebsd-java@FreeBSD.ORG
Subject:   Re: class dependencies (Re: What is ant good for?)
Message-ID:  <27666.200202280254@todday>
In-Reply-To: Remco van 't Veer's message of Wed, 27 Feb 2002 10:01:54 %2B0100

next in thread | raw e-mail | index | archive | help
> I don't know of any source level dependency checkers and I don't
> expect there are any.  Writing something like that is more
> trouble than gain.  Consider finding out all possible values of
> String in a simple statement like:
> 
>     public void addClassByName (String name)
>     {
> 	classes.add(Class.forName(name));
>     }

That means it can't be done perfectly, but doesn't on its own show
that it's not worth doing an imperfect (but perhaps still useful)
version.

This sort of issue used to come up all the time in the Lisp world, for
various sorts of static analysis people wanted to do, because someone
could always do (eval (read)).  Nonetheless, it could still be useful
to perform an analysis, and I think people often talked themselves
out of it when they shouldn't have.

javac seems to do a certain amount of simple dependency-related stuff,
because it doesn't compile only the files I list on the command line.
And there used to be a -depend (later -Xdepend) argument that looked
like it did something useful.  (Anyone know exactly what it did do?)

Anyway, if something derived dependencies from, say, the import
statements (plus a set of files that could be assumed to contain all
the relevant class definitions), that might be useful.  It could
even create a makefile (or equiv) that stated the dependencies it
found, with the programmer able to provide an explicit list for
cases the analyser wouldn't be able to handle; and then the cost
of the anaysis would have to be paid every time you wanted to
compile.  (I'm thinking of how something like "make depend" is used.)

-- Jeff

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27666.200202280254>