[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: Ant and logging in headless mode

"Thomas Friese" <friese@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message 
news:e0hhou$hff$1@xxxxxxxxxxxxxxxxxxxx
>
> Thanks for your helpful answers. Actually it's been a minor glitch that
> I found after hours of debugging: A folder was created after setting the
> raw classpath on the project, leading to an error marker being set on
> the project and preventing the JavaBuilder from building the project
> (and thus invoking the Apt). The error marker was somewhat hard to find
> as some background worker threads removed the error marker when using
> the debugger to stop the process somewhere (I had to walk through the
> code, guess on a reason and had one shot of a few seconds at testing the
> hypothesis until everything went fine due to the background threads
> working on the project).
>
> So luckily no error in the JDT/APT caused my problem.


You have my full sympathy.  It was a long and painful process to get the APT 
generated source folder to be created and added to the classpath at the 
right time, and we took a lot of wrong turns along the way.  Hopefully we 
have it right by now, but only time will tell.

The classpath itself is, unfortunately, not synchronized.  Because the 
interface is get/set - that is, you get the classpath, and then you add your 
item to it, and then you set it - it is possible for two threads both trying 
to modify the classpath simultaneously to collide, in which case one will be 
the winner and one will silently fail to make its modification.