This issue does actually affect both pkl repl and pkl eval. It's trickier to observe for eval because many editors add a trailing newline automatically, which avoids the bug. Here's a repro for eval:
$echo -n '`'| pkl eval /dev/stdin
An unexpected error has occurred. Would you mind filing a bug report?
🔄 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/1187
**Author:** [@HT154](https://github.com/HT154)
**Created:** 8/25/2025
**Status:** ✅ Merged
**Merged:** 8/25/2025
**Merged by:** [@HT154](https://github.com/HT154)
**Base:** `main` ← **Head:** `repl-unmatched-backtick`
---
### 📝 Commits (1)
- [`d4cdc5b`](https://github.com/apple/pkl/commit/d4cdc5ba3ce53e7f2b53fe3a741b60738921f79b) Correctly handle EOF after unmatched backtick
### 📊 Changes
**5 files changed** (+31 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/repl/ReplMessagesTest.kt` (+8 -1)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/errors/singleBacktick.pkl` (+1 -0)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/errors/singleBacktick.err` (+7 -0)
📝 `pkl-parser/src/main/java/org/pkl/parser/Lexer.java` (+8 -1)
📝 `pkl-parser/src/test/kotlin/org/pkl/parser/LexerTest.kt` (+7 -0)
</details>
### 📄 Description
Resolves #1182
This issue does actually affect both `pkl repl` and `pkl eval`. It's trickier to observe for eval because many editors add a trailing newline automatically, which avoids the bug. Here's a repro for eval:
```console
$ echo -n '`' | pkl eval /dev/stdin
An unexpected error has occurred. Would you mind filing a bug report?
```
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/1187
Author: @HT154
Created: 8/25/2025
Status: ✅ Merged
Merged: 8/25/2025
Merged by: @HT154
Base:
main← Head:repl-unmatched-backtick📝 Commits (1)
d4cdc5bCorrectly handle EOF after unmatched backtick📊 Changes
5 files changed (+31 additions, -2 deletions)
View changed files
📝
pkl-cli/src/test/kotlin/org/pkl/cli/repl/ReplMessagesTest.kt(+8 -1)➕
pkl-core/src/test/files/LanguageSnippetTests/input/errors/singleBacktick.pkl(+1 -0)➕
pkl-core/src/test/files/LanguageSnippetTests/output/errors/singleBacktick.err(+7 -0)📝
pkl-parser/src/main/java/org/pkl/parser/Lexer.java(+8 -1)📝
pkl-parser/src/test/kotlin/org/pkl/parser/LexerTest.kt(+7 -0)📄 Description
Resolves #1182
This issue does actually affect both
pkl replandpkl eval. It's trickier to observe for eval because many editors add a trailing newline automatically, which avoids the bug. Here's a repro for eval:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.