[PR #693] [MERGED] Set lower limit for glob pattern resolution in test mode #675

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

📋 Pull Request Information

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

Base: mainHead: max-list-elements


📝 Commits (1)

  • 5439f22 Set lower limit for glob pattern resolution in test mode

📊 Changes

2 files changed (+11 additions, -4 deletions)

View changed files

📝 pkl-core/src/main/java/org/pkl/core/util/GlobResolver.java (+10 -3)
📝 pkl-core/src/main/java/org/pkl/core/util/IoUtils.java (+1 -1)

📄 Description

Motivation:
Speed up the test that verifies enforcement of the limit for glob pattern resolution (invalidGlobImport6.pkl).

Changes:

  • Set a lower limit if test mode is enabled.
  • Change static field to static method to prevent compile-time evaluation by native-image.

Result:
Test takes 0.5 instead of 15 seconds to run (on my machine).

Fixes #691.


🔄 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/693 **Author:** [@odenix](https://github.com/odenix) **Created:** 10/16/2024 **Status:** ✅ Merged **Merged:** 10/16/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `max-list-elements` --- ### 📝 Commits (1) - [`5439f22`](https://github.com/apple/pkl/commit/5439f22cd034a5170169c1efa09aea3ae52cb851) Set lower limit for glob pattern resolution in test mode ### 📊 Changes **2 files changed** (+11 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `pkl-core/src/main/java/org/pkl/core/util/GlobResolver.java` (+10 -3) 📝 `pkl-core/src/main/java/org/pkl/core/util/IoUtils.java` (+1 -1) </details> ### 📄 Description Motivation: Speed up the test that verifies enforcement of the limit for glob pattern resolution (invalidGlobImport6.pkl). Changes: - Set a lower limit if test mode is enabled. - Change static field to static method to prevent compile-time evaluation by native-image. Result: Test takes 0.5 instead of 15 seconds to run (on my machine). Fixes #691. --- <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:05 +01:00
adam closed this issue 2025-12-30 01:26:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#675