Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the phase of reconfiguring the compilation tasks #10

Open
zyxist opened this issue Mar 8, 2018 · 4 comments
Open

Change the phase of reconfiguring the compilation tasks #10

zyxist opened this issue Mar 8, 2018 · 4 comments
Labels

Comments

@zyxist
Copy link
Owner

zyxist commented Mar 8, 2018

Follow up: #9

Compile task reconfiguration is done in doFirst phase (during execution). They change the configuration which affects incremental compilation. Moving it to the configuration phase should solve this issue.

zyxist added a commit that referenced this issue Mar 13, 2018
…nfirming that incremental compilation works as expected
@zyxist
Copy link
Owner Author

zyxist commented Mar 13, 2018

The reconfiguration has been changed. Regarding incremental compilation: there is no difference between reconfiguring the JavaCompile tasks in doFirst, or in the configuration phase. In both cases, the debug log shows that the incremental compilation works as expected. The task seems to ignore changes of the compilation options. However, I have added a test to ensure that the plugin covers this use case as well.

@zyxist zyxist closed this as completed Mar 13, 2018
@zyxist zyxist added this to the chainsaw-0.3.1 milestone Mar 13, 2018
@Vampire
Copy link

Vampire commented Mar 23, 2018

Changed to what? As far as I can see from the commit, you still configure the task during execution phase, not configuration phase.

I also never said it will influence incremental compilation, but incremental task execution, the UP-TO-DATE checks that determine whether a task needs to be executed at all or not.

Also this does not only affect incremental execution but also using the build cache.

There might be other stuff affected as configuration of a task should never be changed during execution phase, but only during configuration phase.

@zyxist zyxist reopened this Mar 25, 2018
@zyxist
Copy link
Owner Author

zyxist commented Mar 25, 2018

I've reopened the issue - I checked once more and indeed, the whole orchestrator is called in afterEvaluate(), which should not happen, because there are parts of the tasks that were not supposed to called so lately.

@zyxist zyxist added bug and removed enhancement labels Mar 25, 2018
@Vampire
Copy link

Vampire commented Mar 26, 2018

If you call doLast or doFirst in am afterEvaluate block, that doesn't change when it is executed. doLast and doFirst blocks are still executed during execution phase, calling those methods in afterEvaluate just attaches them at the end of configuration phase but they are still executed at execution phase.

@zyxist zyxist modified the milestones: chainsaw-0.3.1, chainsaw-0.3.2 Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants