[PR #330] [MERGED] Do not package empty directories #505

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/330
Author: @StefMa
Created: 3/17/2024
Status: Merged
Merged: 3/19/2024
Merged by: @bioball

Base: mainHead: package-empty-dirs


📝 Commits (2)

  • a0ee462 Do not package empty directories
  • aea985d Remove unused method

📊 Changes

2 files changed (+22 additions, -30 deletions)

View changed files

📝 pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt (+17 -13)
📝 pkl-core/src/main/java/org/pkl/core/project/ProjectPackager.java (+5 -17)

📄 Description

fixes #318

The solution is simply:
We only collect "RegularFiles".
In this case we filter out directories of that returning List.
Since the regular files already includes the path (obviously), the packaging still works as expected 🚀


🔄 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/330 **Author:** [@StefMa](https://github.com/StefMa) **Created:** 3/17/2024 **Status:** ✅ Merged **Merged:** 3/19/2024 **Merged by:** [@bioball](https://github.com/bioball) **Base:** `main` ← **Head:** `package-empty-dirs` --- ### 📝 Commits (2) - [`a0ee462`](https://github.com/apple/pkl/commit/a0ee462f59b654b1ccaf403c5132a24057734815) Do not package empty directories - [`aea985d`](https://github.com/apple/pkl/commit/aea985df82aaba1c710bcd858756e413d684d134) Remove unused method ### 📊 Changes **2 files changed** (+22 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt` (+17 -13) 📝 `pkl-core/src/main/java/org/pkl/core/project/ProjectPackager.java` (+5 -17) </details> ### 📄 Description fixes #318 The solution is simply: We only collect "RegularFiles". In this case we filter out directories of that returning `List`. Since the regular files already includes the path (obviously), the packaging still works as expected 🚀 --- <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:25:00 +01:00
adam closed this issue 2025-12-30 01:25:00 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#505