ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Evenson <even...@panix.com>
Subject emacs cygwin compile.el next-error fails with Ant (Was Re: [BUG])
Date Thu, 24 Jul 2003 07:46:18 GMT
Thanks for the gently black humor.  As regards to the subject line, I had
intended it to be more descriptive, along the lines of "emacs cygwin
compile.el next-error fails with Ant", so my apologies.

After poking around a little more, I think this actually qualifies as a
"bug" [[1]] in Ant rather than with emacs or cygwin.  My reasoning?  The
$ANT_ROOT/dist/bin/ant shell script used to invoke Ant under cygwin already
checks to see if Ant is invoked within cygwin, and proceeds to normalize
the various ANT_* environment variables before invoking the Java VM, first
to UNIX for comparison, then to Windows for the actual invocation, so
concessions are already made to operating within cygwin.  When the
build.compiler.emacs property is true AND Ant is running under cygwin, the
meaning is clear: Ant should emit the UNIX style paths that cygwin emacs
expects to parse.  Unfortunately there doesn't seem to be a property
(checked via <echoproperties>) that tells Ant it is running inside cygwin.
And of course, since the error messages from the <javac> task come straight
from the compiler (which, as a native win32 task, will only work running
with Win32 path.separator value), this means an additional transformation
of the compilation message stream which I can't see a great place to hook
into the Ant codebase.  But then again I am new to Ant internals, so maybe
further investigation will reveal the correct place for such a hook.

It should be incumbant upon me to contribute the necessary patches to Ant,
but I am writing out my thoughts as a) it may take a while and b) for
someone to correct me with an easier solution [[2]].





[[1]]  Maybe "bug" is too strong a word here.

[[2]] An easier solution would to be to wrap the 'ant' script in a gawk
      script that invokes "cygpath" on its own, but that doesn't fix the
      "broken" behavior of Ant.

-- 
Mark Evenson <evenson@panix.com>

"A screaming comes across the sky.  It has happened before, but there is
nothing to compare to it now."

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message