Originally created by @jstrachan on GitHub (May 7, 2024).
when running pkl test inside IntelliJ as a command we get nice links to source files in the output when things fail
e.g. the output is something like this...
at something.orOther (file://someFileURL, line 34)
clicking on those file URLs work and the source is opened - at line 1
if we modified the output ever so slightly to be....
at something.orOther (file://someFileURL:34)
then IntelliJ would open the file at the line 34 if you click on the above link which would help folks navigate to the source of an error/test failure more quickly
Originally created by @jstrachan on GitHub (May 7, 2024).
when running `pkl test` inside IntelliJ as a command we get nice links to source files in the output when things fail
e.g. the output is something like this...
```
at something.orOther (file://someFileURL, line 34)
```
clicking on those file URLs work and the source is opened - at line 1
if we modified the output ever so slightly to be....
```
at something.orOther (file://someFileURL:34)
```
then IntelliJ would open the file at the line `34` if you click on the above link which would help folks navigate to the source of an error/test failure more quickly
@bioball commented on GitHub (May 7, 2024):
You can use a [settings file](https://pkl-lang.org/main/current/pkl-cli/index.html#settings-file) to modify how stack frames get presented. This will produce links that will get opened in IntelliJ:
```groovy
amends "pkl:settings"
editor = Idea
```
Here's my personal one, which outputs anchors (supported by iTerm 2, not sure about other terminals)
```groovy
amends "pkl:settings"
local schema: String = "idea"
// https://iterm2.com/documentation-escape-codes.html
local ESC: String = "\u{1B}"
local OSC8: String = "\(ESC)]8"
local ST: String = "\(ESC)\\"
local COLOR_DIM_BLUE: String = "\(ESC)[2;34m"
local COLOR_RESET: String = "\(ESC)[0m"
editor {
urlScheme = "\(COLOR_DIM_BLUE)\(OSC8);;\(schema)://open?file=%{path}&line=%{line}\(ST)%{path}:%{line}\(OSC8);;\(ST)\(COLOR_RESET)"
}
```

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.
Originally created by @jstrachan on GitHub (May 7, 2024).
when running
pkl testinside IntelliJ as a command we get nice links to source files in the output when things faile.g. the output is something like this...
clicking on those file URLs work and the source is opened - at line 1
if we modified the output ever so slightly to be....
then IntelliJ would open the file at the line
34if you click on the above link which would help folks navigate to the source of an error/test failure more quickly@bioball commented on GitHub (May 7, 2024):
You can use a settings file to modify how stack frames get presented. This will produce links that will get opened in IntelliJ:
Here's my personal one, which outputs anchors (supported by iTerm 2, not sure about other terminals)
@jstrachan commented on GitHub (May 8, 2024):
love that! would be good to add to the docs