ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43114] package-info.java repeatedly compiled
Date Fri, 18 Apr 2008 03:11:43 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=43114


Lachlan O'Dea <odela01@ca.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |odela01@ca.com




--- Comment #6 from Lachlan O'Dea <odela01@ca.com>  2008-04-17 20:11:43 PST ---
(In reply to comment #5)
> I have gone with a combination of both approaches, please
> test the nightly build.

Ok, I understand why you've decided on this, but there's a potential problem if
the package-info.java does contain annotations with CLASS or RUNTIME retention,
and you somehow get in the state where the package-info.class file has been
deleted, but the containing directory has not. In such a state, javac will
refuse to recreate the package-info.class file, until the containing directory
is deleted.

This is happening to me because I'm using a dependset to manually manage the
dependencies of a custom annotation processor. There's currently no way to make
dependset delete target directories (only files), so I end up in the state
described above.

I'm not sure of the best way to deal with it. If it is felt that this scenario
is generally unlikely, and dependset is a special case, then adding an option
to dependset to also delete target directories would do the trick. Otherwise,
adding a javac option to control the behavior is a possibility.

Actually, I'm not sure if checking the target directory timestamp is a good
idea in general. Even if your package-info.java is updated, if any previous
step in the build has touched its target directory in some way, it won't be
compiled. This is a potential problem for SOURCE retention as well...


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message