mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
Crash help text has mangled URL #32
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Edward-Knight on GitHub (Feb 5, 2024).
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:
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:6eb3d20b47/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.:
@Edward-Knight commented on GitHub (Feb 5, 2024):
Or actually, looking at the code further, is the URL missing a
?body=? So it should be https://github.com/apple/pkl/issues/new?body=java.lang.StackOverflowError?@holzensp commented on GitHub (Feb 9, 2024):
Fixed by PR #73
@Edward-Knight commented on GitHub (Feb 9, 2024):
Although #73 will ensure the URL is always valid, I don't think it's a full fix. The next line tries to URL encode the error, presumably so it can be put in the title or body of the GitHub issue
@Edward-Knight commented on GitHub (Feb 9, 2024):
Also should I open a separate issue about the stack overflow or is the current behaviour expected?
@holzensp commented on GitHub (Feb 9, 2024):
The stack overflow is expected, although arguably it's missing a stack frame (cc @stackoverflow and not just for the ironically appropriate username). In Pkl,
a = ais the simplest way to cause a stack overflow. That's essentially what you're doing here, because inoutput { value = output }, the inneroutput"ties a loop" with the outeroutput.Re-opening to follow up about the query parts of the URL (which may have been rolled into the URL encoding fix)