RFR 8054715: Changing the source roots and/or their filters forces a full recompile.

Fredrik Öhrström oehrstroem at gmail.com
Tue Aug 19 08:50:34 UTC 2014


The command line stored in javac_state is only used to detect if sjavac
should recompile all sources from scratch. Options that do not affect the
output should not be stored there. "-x" "-i" are such options.






2014-08-19 8:58 GMT+02:00 Andreas Lundblad <andreas.lundblad at oracle.com>:

> On Fri, Aug 08, 2014 at 11:16:14PM +0200, Fredrik Öhrström wrote:
> > Changing the source roots and/or their filters forces a full recompile,
> > since the source roots and the filters are included in the command line
> > memory in the javac_state file.
> >
> > This is a bug, since all changes to the set of source files should be
> > gracefully handled incrementally.
> >
> > SJavac should do an incremental compile both when:
> > beta/B.java is deleted from the file system (this works)
> > or when
> > "-x beta" is added to the command line to exclude beta/B.java from
> > compilation (this does not work).
> >
> > Simple fix, do not include the filters and the source roots in the memory
> > line in the javac_state file.
>
>
> So you say it works if beta/B.java is in fact deleted, but doesn't work if
> "-x beta" is added. Ideally "-x beta" should hide beta and the effect
> should be the same as if beta/B.java was removed from the file system, no?
> If we solve this by changing what we save in javac_state it feels like
> we're fixing the problem in the wrong place.
>
> If there's just no way to solve this at a better level of abstraction,
> then I would still argue that we shouldn't decide what options to save or
> not to save in javac_state based on these kind of corner cases. Save all
> options as is, and then, when deciding whether to do an incremental compile
> or not, we take the relevant options into account.
>
> -- Andreas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20140819/2115a6d0/attachment.html>


More information about the compiler-dev mailing list