Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add warning that Gradle configuration cache broken for spotlessCheck in latest v7.0.2

オープン
#2,431 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
git, java, kotlin
領域
build-system

調査の方向性

spotlessCheck を使ってブランチ切り替えコマンドを再現し、Gradle の configuration-cache レポートを調査します。まずルートレベルの build.gradle.kts にある Spotless 設定から始め、次に org.eclipse.jgit.util.io.SilentFileInputStream から .git/HEAD および .git/config への報告されたアクセスを追跡します。issue で要求された警告または文書化された制限が実装され、configuration-cache の動作が検証されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug enhancement

the spotlessCheck task seems to (indirectly) use the file .git/HEAD, as switching between branches causes a gradle configuration cache miss.

EG:

> git checkout test-branch
> gradle spotlessCheck
… (stores configuration cache)
> git checkout main
> gradle spotlessCheck
Calculating task graph as configuration cache cannot be reused because file '.git/HEAD' has changed.

spotless is configured as follows in the root level build.gradle.kts

spotless.apply {
  kotlin {
    target("src/**/*.kt”)
    ktlint(libs.versions.ktlint.get())
  }
}

This seems to be caused by JGit. The configuration cache report has the class org.eclipse.jgit.util.io.SilentFileInputStream accessing .git/HEAD and .git/config. Although this is occurinig within JGit, perhaps theres a call to JGit that can be wrapped in a ValueSource? Or perhaps there’s a configuration to change/disable parts of spotless to fix this?

主要言語
Java
スター
5.7k
フォーク
560
平均マージ
1日 13時間
マージ済み PR(30日)
43

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

diffplug/spotless のほかの issue

diffplug/spotless の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。