This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strange problem with jetty


On 12/02/2011 03:04 PM, John Smith wrote:
That looks good to me.

Two thoughts:

1. The second warning stanza "no declaration seen for org.mortbay.jetty.Server" could be prefixed with "Consequently" or "Therefore" or "Due to the above warning".

So the first two lines would read:
/dev/stdin:1:1: warning - error loading class org.mortbay.jetty.Server - org/mortbay/util/Attributes not found
/dev/stdin:1:1: warning - Therefore no declaration seen for org.mortbay.jetty.Server

That's hard to do because the second warning is from a later compiler pass. It would be possible to use a flag like ALREADY_WARNED to suppress duplicate warnings. It might also be possible to move where the second warning is emitted. But that's for another day.

2. What about adding a note in the documentation.

Along the lines of "if you want a class you just call it, but that if its chain of dependencies are not present due to inadequate classpath (something known only at runtime?) then pay close attention to the error message."

Maybe, but the hard part is figuring out where to put something in the documentation.
(In general organizing the documentation is the difficult part.)


FYI: org.mortbay.jetty.Server is resolved by a process of searching
for a default: I.e. if there is no lexical (compile-time) binding for a
symbol, then Kawa will first (at compile-time) look in the compile-time
dynamic envionment, and then look for certain defaults: numeric quantities
(like 3.5s), names of classes in the classpath, and a few others.
If nothing is found, then the compiler will emit a warning and generate
code to look for a binding in the dynamic environment at run-time.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]