[PR #1126] [MERGED] Only allow shebangs in the beginning of a module #900

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

📋 Pull Request Information

Original PR: https://github.com/apple/pkl/pull/1126
Author: @stackoverflow
Created: 7/16/2025
Status: Merged
Merged: 7/18/2025
Merged by: @stackoverflow

Base: mainHead: fix-shebangs


📝 Commits (4)

  • d814117 Only allow shebangs in the beginning of a module
  • 7fd5ca9 Only allow shebangs at the very beginning of a file
  • 3a8a9c9 Revert previous commit
  • f9b76d5 Fix tests

📊 Changes

6 files changed (+20 additions, -4 deletions)

View changed files

pkl-core/src/test/files/LanguageSnippetTests/input/errors/shebang.pkl (+2 -0)
pkl-core/src/test/files/LanguageSnippetTests/input/syntax/shebang.pkl (+2 -0)
pkl-core/src/test/files/LanguageSnippetTests/output/errors/shebang.err (+6 -0)
pkl-core/src/test/files/LanguageSnippetTests/output/syntax/shebang.pcf (+1 -0)
📝 pkl-parser/src/main/java/org/pkl/parser/Parser.java (+6 -4)
📝 pkl-parser/src/main/resources/org/pkl/parser/errorMessages.properties (+3 -0)

📄 Description

Fixes #1125


🔄 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/1126 **Author:** [@stackoverflow](https://github.com/stackoverflow) **Created:** 7/16/2025 **Status:** ✅ Merged **Merged:** 7/18/2025 **Merged by:** [@stackoverflow](https://github.com/stackoverflow) **Base:** `main` ← **Head:** `fix-shebangs` --- ### 📝 Commits (4) - [`d814117`](https://github.com/apple/pkl/commit/d81411731c0ecbb4e4ca2c37ed8823e8d79812df) Only allow shebangs in the beginning of a module - [`7fd5ca9`](https://github.com/apple/pkl/commit/7fd5ca9eae58731d646206803d7098a9633f22ca) Only allow shebangs at the very beginning of a file - [`3a8a9c9`](https://github.com/apple/pkl/commit/3a8a9c95ee21fdf2cf3d630fc632efdf348933ba) Revert previous commit - [`f9b76d5`](https://github.com/apple/pkl/commit/f9b76d5ee55d046af7a1365f93adba96385f0f94) Fix tests ### 📊 Changes **6 files changed** (+20 additions, -4 deletions) <details> <summary>View changed files</summary> ➕ `pkl-core/src/test/files/LanguageSnippetTests/input/errors/shebang.pkl` (+2 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/input/syntax/shebang.pkl` (+2 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/output/errors/shebang.err` (+6 -0) ➕ `pkl-core/src/test/files/LanguageSnippetTests/output/syntax/shebang.pcf` (+1 -0) 📝 `pkl-parser/src/main/java/org/pkl/parser/Parser.java` (+6 -4) 📝 `pkl-parser/src/main/resources/org/pkl/parser/errorMessages.properties` (+3 -0) </details> ### 📄 Description Fixes #1125 --- <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:27:38 +01:00
adam closed this issue 2025-12-30 01:27:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#900