better error reporting for missing .jar file
GoogleCodeExporter opened this issue · comments
Repro:
vogar missing.jar not-missing.java
Results:
"no actions Specified"
Expected:
'missing.jar' does not exist
Original issue reported on code.google.com by peter...@google.com
on 23 Apr 2010 at 9:45
This is tricky because we allow you to pass arguments to the target process.
For example, given a program
Echo.java that prints its args,
vogar Echo.java hello world
Vogar uses a heuristic to identify Echo.java as a file. When it sees arguments
that aren't files, it assumes that
they should be passed directly to the target process. So in this case, it's
assuming missing.jar is a command
line argument.
To detect errors sooner, perhaps we should require that target arguments never
end with ".jar" or ".java" ?
Original comment by limpbizkit
on 24 Apr 2010 at 5:04
> To detect errors sooner, perhaps we should require that target arguments
never end
with ".jar" or ".java" ?
i'd rather it was the other way round, with how we tell vogar what to do being
a bit
more explicit. i often want to say "run these two benchmarks" or "run these
three
tests".
the jar files in particular feel like they should have some kind of --whatever-
classpath before them. i thought the current syntax was weird when it went in,
but
didn't have a concrete example to complain about.
GCC -- though it will try to guess what to do with a file based on extension --
does
let you explicitly say. (just in case you feel the need to store your C++ in
.java
files and your Java in .f77 files.) something similar might be useful for us.
i've
certainly had cases where the heuristics were wrong. just because something
matches
*Test.java doesn't mean it's a junit test, and our behavior in that case isn't
very
clever.
Original comment by elliott....@gmail.com
on 24 Apr 2010 at 6:52
+1 to an explicit --classpath option for jar files
Original comment by peter...@google.com
on 26 Apr 2010 at 6:14