For some time, I've been using Haskero on Windows 10 for Haskell programming, and it's been great for a long time. Recently, however, I repaved my laptop, and since then, the functionality that enables switching targets contains garbled output:
This isn't just a display issue. It effectively prevents me from being able to switch targets:
Spawning process 'stack' with command 'stack ghci --with-ghc intero "--ghci-options=-ignore-dot-ghci -Wall" --no-build --no-load RestaurantReservation:test:RestaurantReservation-test[0m'
[Error - 07:52:52] Change targets failed. Stopping Haskero for this target. Switch to another target or 'Default targets'.
Hint : try running a build command to get missing dependencies (> stack build RestaurantReservation:test:RestaurantReservation-test[0m)
Error details:
Message: Request changeTargets failed unexpectedly without providing any details.
Code: -32603
Notice that when I try to switch to the test target, it issues a command to stack
that includes those non-printable characters. Among other issues, this means that I get absolutely no value from the add-in for my unit tests.
The presence of those non-printable characters, as well as stty: 'standard input': Inappropriate ioctl for device
looks to me like an issue with with how standard output is interpreted.
As far as I can tell, from perusing the Haskero code base, it looks as though the list of targets comes from stack ide targets
. If, however, I issue this command on the command line, all looks good:
$ stack ide targets
RestaurantReservation:lib
RestaurantReservation:exe:RestaurantReservation
RestaurantReservation:test:RestaurantReservation-test
This used to work on Windows 10 before I repaved the machine, but now it doesn't.
Since it worked before re-installation, I'm hoping that there's some environment setting I can tweak to get the functionality back, but if there is, it's not clear to me what it'd be.
How do I make the targets dialogue use clean target names, so that switching among them is possible?