Weird repl output and interactions
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
hello, I've been using the repl but the experience has been a bit rough around the edges.
I am on windows and perhaps that is why, since i know that window support is just coming together.
For example, when I use the repl from the PS there seems to be a struggle with new lines and command submissions:
```
pkl0> lol = IntSeq(1,10)
lol = IntSeq(1,10)
/* to force the new input I had to close the statement
* using ;
*/
;
pkl1> lol
IntSeq(1, 10)
pkl2> lil = IntSeq(1, 102);
lil = IntSeq(1, 102)pkl3> // new prompt not on a new line
```
copy pasting a multiline expression is impossible as it adds `:` characters on every new line?
```
pkl5> class MyClass {
local test = IntSeq(30, 45)
: <---- this guy over here officer
JLine terminal: do you wish to see all 7 possibilities (0 lines)?ocal test = IntSeq(30, 45)
frequencies: Listing
}
```
while the pasted content was
```
class MyClass {
local test = IntSeq(30, 45)
frequencies: Listing
}
```
There seems to be some jumbled up text in the error messages:
```
pkl0> IntSeq(1, 10).step(2.0)
IntSeq(1, 10).step(2.0)ΓÇôΓÇô Pkl Error ΓÇôΓÇô <---- Is this intended? if so, it's a bit weird :D
Expected value of type Int, but got type Float.
Value: 2.0
2620 | external function step(newValue: Int(isNonZero)): IntSeq
^^^
at pkl.base#IntSeq.step (https://github.com/apple/pkl/blob/0.26.3/stdlib/base.pkl#L2620)
1 | IntSeq(1, 10).step(2.0)
^^^^^^^^^^^^^^^^^^^^^^^
at (repl:pkl0)
pkl1>
```
Is this an issue with PS?
Contributor guide
Research direction
Start by reproducing the REPL behavior in Windows PowerShell, focusing on multiline input, pasted expressions, prompt placement, and the JLine terminal output. Compare the diagnostics against the referenced stdlib/base.pkl location; done means multiline commands submit correctly and prompts and error messages render without jumbled text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, powershell
- Domain
- cli, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100