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

Gradle 3.1 change: "replaced" change type breaks compatibility with existing plugin #748

Closed
ducrohet opened this issue Oct 24, 2016 · 4 comments
Assignees
Milestone

Comments

@ducrohet
Copy link
Contributor

ducrohet commented Oct 24, 2016

The change adds a new ChangeType value REPLACED (reference: 0a4a3bb). This leads to two issues:

FileChange has not been updated to provide a isReplaced() method so plugins cannot query for this kind of file change. Because OrderSensitiveTaskFilePropertyCompareStrategy has been changed to exclusively use the new status instead of MODIFIED some file changes cannot be detected by new task implementations.

However a bigger problems is that existing plugins that go through IncrementalTaskInputs.outofDate looking at isModified() will also always miss the files that use the new status. The only fix is to release a new version of the plugin (after the new API is fixed with a new isReplaced() method).

In order to be compatible, I believe Gradle should make these replaced files return true for both isModified() and isReplaced(). This require some more refactoring as FileChange only support a single ChangeType.

The Gradle plugin for Android is failing some of its tests on 3.1 because of this.

@lptr
Copy link
Member

lptr commented Oct 25, 2016

FTR: the task output cache team is tracking this issue as ☝️.

@wolfs
Copy link
Member

wolfs commented Oct 26, 2016

LGTM. I think we should open a JIRA issue (this affect 3.1, right)? Should we also add something to the release notes apart from the JIRA issue which will be automatically added? I think the issue should be enough.

@lptr
Copy link
Member

lptr commented Oct 26, 2016

Added JIRA issue. I also think it should be enough for the release notes.

@wolfs wolfs added this to the 3.2 milestone Oct 26, 2016
@eriwen eriwen mentioned this issue Oct 26, 2016
2 tasks
@eriwen
Copy link
Contributor

eriwen commented Nov 15, 2016

Closing as delivered in Gradle 3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants