GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Convert `SpotlessTaskModern` to use `InputChanges` API by bigdaz · Pull Request #607 · diffplug/spotless

Conversation

@bigdaz

@bigdaz bigdaz commented Jun 8, 2020

Copy link
Copy Markdown
Contributor

This minimal change updates the task to use the non-deprecated
InputChanges API, making it compatible with an upcoming Gradle 7.0
release. This addresses one part of #601.

I haven't updated CHANGES.md since "spotlessModern" is not yet mentioned.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bigdaz
Convert SpotlessTaskModern to use InputChanges API
989f12a
This minimal change updates the task to use the non-deprecated
`InputChanges` API, making it compatible with an upcoming Gradle 7.0
release.
@nedtwigg

nedtwigg commented Jun 8, 2020

Copy link
Copy Markdown
Member

Looks like ConfigAvoidanceTest is failing for the modern implementation. You can put @Category(ExcludeFromPluginGradleModern.class) on it, or you can detect this:

spotless/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/GradleIntegrationHarness.java

Line 82 in 495aa3f

if ("true".equals(System.getProperty(SpotlessPluginModern.SPOTLESS_MODERN))) {

and change the test as necessary. Feel free to modify GradleIntegrationHarness as necessary if it makes testing easier.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bigdaz

bigdaz commented Jun 8, 2020

Copy link
Copy Markdown
Contributor Author

I didn't have a chance to investigate: does it makes sense that this test fails?

Passes on JDK 11: https://scans.gradle.com/s/doieryq3v5kp6
Fails on JDK8: https://scans.gradle.com/s/ue2kfzw3ipgam

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg

nedtwigg commented Jun 8, 2020

Copy link
Copy Markdown
Member

I would expect it to fail for both.

spotless/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/ConfigAvoidanceTest.java

Line 26 in 495aa3f

return gradleRunner().withGradleVersion(SpotlessPluginPreConfigAvoidance.CONFIG_AVOIDANCE_INTRODUCED.getVersion());

spotless/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessPluginPreConfigAvoidance.java

Line 24 in 495aa3f

static final GradleVersion CONFIG_AVOIDANCE_INTRODUCED = GradleVersion.version("4.9");

and InputChanges was introduced in 5.4

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bigdaz
Centralize the Gradle versions used in tests and adapt for JDK11
536709b
@nedtwigg

nedtwigg commented Jun 10, 2020

Copy link
Copy Markdown
Member

Wow, what an elegant solution! This looks ready to merge to me, feel free to push merge whenever you'd like (or ask me if you'd prefer not to accept the committer invite I just sent you).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bigdaz

bigdaz commented Jun 11, 2020

Copy link
Copy Markdown
Contributor Author

Thanks @nedtwigg. I've accepted your invite to the Diffplug org, but I want to state up front that I'm very unlikely to have capacity to stay involved in the development of Spotless long-term. My goal is to get the plugin into a good state and work well with the Gradle remote cache, then I'll probably disappear.

But it's certainly nice to be asked :).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bigdaz
bigdaz merged commit 7fb2333 into diffplug:master Jun 11, 2020
@bigdaz
bigdaz deleted the dd/inputchanges branch June 11, 2020 23:35
@nedtwigg

nedtwigg commented Jun 11, 2020

Copy link
Copy Markdown
Member

Sounds great! Being a committer on the Spotless team comes with no duties, only privileges :) Now you can restart a failed CI job if you think it was flaky, merge-at-will, etc. If you can figure out how to make a project loosely-coupled (as we have for Spotless), then I think the ideas of OPEN open source are useful.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@bigdaz @nedtwigg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.