Skip to content

Conversation

jamesarich
Copy link
Collaborator

Adds spotless doco to CONTRIBUTORS.md

Clarify that spotless is used for automated code formatting and provide commands for applying formatting and installing a pre-push Git hook.

Clarify that spotless is used for automated code formatting and provide commands for applying formatting and installing a pre-push Git hook.

Signed-off-by: James Rich <[email protected]>
@jamesarich jamesarich enabled auto-merge August 2, 2025 15:25
Copy link
Contributor

@jsoberg jsoberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel targeted 😅

@jamesarich
Copy link
Collaborator Author

I feel targeted 😅

I've been meaning to, you're a good reminder ;)

@jsoberg
Copy link
Contributor

jsoberg commented Aug 2, 2025

Huh I'm actually getting a failure from within Spotless' install task:

1 problem was found storing the configuration cache.
- Task `:app:spotlessInstallGitPrePushHook` of type `com.diffplug.gradle.spotless.SpotlessInstallPrePushHookTask`: invocation of 'Task.project' at execution time is unsupported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:use_project_during_execution
  
  ...
  
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:spotlessInstallGitPrePushHook'.
> Invocation of 'Task.project' by task ':app:spotlessInstallGitPrePushHook' at execution time is unsupported with the configuration cache.

@jamesarich
Copy link
Collaborator Author

Huh I'm actually getting a failure from within Spotless' install task:

1 problem was found storing the configuration cache.
- Task `:app:spotlessInstallGitPrePushHook` of type `com.diffplug.gradle.spotless.SpotlessInstallPrePushHookTask`: invocation of 'Task.project' at execution time is unsupported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:use_project_during_execution
  
  ...
  
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:spotlessInstallGitPrePushHook'.
> Invocation of 'Task.project' by task ':app:spotlessInstallGitPrePushHook' at execution time is unsupported with the configuration cache.

mm i do remember having to run it with --no-configuration-cache i'll add that

@jamesarich jamesarich disabled auto-merge August 2, 2025 15:37
The command to install the Spotless Git pre-push hook was updated to include `--no-configuration-cache` to ensure it runs correctly.

Signed-off-by: James Rich <[email protected]>
@jamesarich jamesarich enabled auto-merge August 2, 2025 15:38
@jsoberg
Copy link
Contributor

jsoberg commented Aug 2, 2025

Ah I can probably fix that on Spotless' end, they just need to grab the root dir before executing the task

@jamesarich jamesarich added this pull request to the merge queue Aug 2, 2025
@jamesarich jamesarich added the documentation Improvements or additions to documentation label Aug 2, 2025
@jamesarich jamesarich removed this pull request from the merge queue due to a manual request Aug 2, 2025
@jamesarich jamesarich enabled auto-merge August 2, 2025 16:01
@jamesarich jamesarich added this pull request to the merge queue Aug 2, 2025
@jsoberg
Copy link
Contributor

jsoberg commented Aug 2, 2025

Re: spotless - diffplug/spotless#2586

Once that gets merged in and we update spotless I'll update our docs so that we don't need the config cache disable flag. I tested with maven-local install and it worked fine 👍

Merged via the queue into meshtastic:main with commit 4da8b22 Aug 2, 2025
6 of 7 checks passed
@jamesarich jamesarich deleted the docs/spotless branch August 2, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants