apple / apple/pkl

Crash help text has mangled URL

Open
#61 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

The help text output when a crash happens has a URL to help submit a bug report, however this URL is mangled due to a missing newline:

```
$ echo "a { b = a }" | pkl eval - 2>&1 | head
An unexpected error has occurred. Would you mind filing a bug report?
Cmd+Double-click the link below to open an issue.
Please copy and paste the entire error output into the issue's description, provided you can share it.

https://github.com/apple/pkl/issues/newjava.lang.StackOverflowError

–– Pkl Error ––
Stack overflow

Pkl 0.25.1 (macOS 14.1, native)
```

The URL is https://github.com/apple/pkl/issues/newjava.lang.StackOverflowError ~~instead of https://github.com/apple/pkl/issues/new~~.

~~This seems to be caused by a missing newline at the end of this paragraph:~~

https://github.com/apple/pkl/blob/6eb3d20b472f4ae53595edf13b3499520c075b76/pkl-core/src/main/java/org/pkl/core/runtime/VmExceptionRenderer.java#L57-L62

---

I can open a separate issue for the stack overflow if needed - seems sometimes this is caught, e.g.:
```
$ echo "output { value = output }" | pkl eval - 2>&1
–– Pkl Error ––
A stack overflow occurred.

┌─ 4001 repetitions of:
│ 106 | text = renderer.renderDocument(value)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│ at pkl.base#Module.output.text (https://github.com/apple/pkl/blob/0.25.1/stdlib/base.pkl#L106)
└─
```

Contributor guide

Open the contributing guide

Research direction

Inspect pkl-core/src/main/java/org/pkl/core/runtime/VmExceptionRenderer.java around lines 57–62, then reproduce the output with the reported pkl eval command. Done means the crash help text ends the GitHub issue URL before the following error text, while the existing stack-overflow behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.