[PR #722] [MERGED] Fix build performance issues of spotless tasks #695

Closed
opened 2025-12-30 01:26:12 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/722
Author: @odenix
Created: 10/22/2024
Status: Merged
Merged: 10/22/2024
Merged by: @bioball

Base: mainHead: spotless


📝 Commits (1)

  • 65eee91 Fix build performance issues of spotless tasks

📊 Changes

2 files changed (+8 additions, -7 deletions)

View changed files

📝 buildSrc/src/main/kotlin/pklAllProjects.gradle.kts (+6 -5)
📝 buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts (+2 -2)

📄 Description

Motivation:
Spotless tasks take minutes instead of seconds to complete. This greatly slows down gw spotlessApply, gw check, and gw build.

Changes:

  • Use more efficient glob expressions for inclusion filters (target()).
  • Avoid the need for exclusion filters (targetExclude()).

Result:
Spotless tasks complete in seconds instead of minutes. As a concrete example, repeated invocation of gw spotlessApply completes in 2 instead of 122 seconds on my laptop.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/apple/pkl/pull/722 **Author:** [@odenix](https://github.com/odenix) **Created:** 10/22/2024 **Status:** ✅ Merged **Merged:** 10/22/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `spotless` --- ### 📝 Commits (1) - [`65eee91`](https://github.com/apple/pkl/commit/65eee916ad098010a2c8116980bf5e7f40dd5343) Fix build performance issues of spotless tasks ### 📊 Changes **2 files changed** (+8 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `buildSrc/src/main/kotlin/pklAllProjects.gradle.kts` (+6 -5) 📝 `buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts` (+2 -2) </details> ### 📄 Description Motivation: Spotless tasks take minutes instead of seconds to complete. This greatly slows down `gw spotlessApply`, `gw check`, and `gw build`. Changes: - Use more efficient glob expressions for inclusion filters (`target()`). - Avoid the need for exclusion filters (`targetExclude()`). Result: Spotless tasks complete in seconds instead of minutes. As a concrete example, repeated invocation of `gw spotlessApply` completes in 2 instead of 122 seconds on my laptop. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 01:26:12 +01:00
adam closed this issue 2025-12-30 01:26:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#695