I'd say the haskell_stack gimmick, while nicely displaying the ghc version if I am in a directory with stack.yaml, does a bit too much.
- It is slow. When I change to a directory that has a
stack.yaml, I am waiting a couple of seconds before my prompt appears.
The reason is that stack is slow, it does all kind of stuff before it gives the desired answer.
- One of these things
stack is doing creating a .cabal file from a package.yaml file (using its internal version of hpack).
This seems a bit too much. I do not want my shell prompt to create new files. I just want it to display information.
So my advice would be to switch this feature off until it gets fixed.
|
_p9k_haskell_stack_version() { |
|
if ! _p9k_cache_stat_get $0 $1 ${STACK_ROOT:-~/.stack}/{pantry/pantry.sqlite3,stack.sqlite3}; then |
|
local v |
|
v="$(STACK_YAML=$1 stack \ |
|
--silent \ |
|
--no-install-ghc \ |
|
--skip-ghc-check \ |
|
--no-terminal \ |
|
--color=never \ |
|
--lock-file=read-only \ |
|
query compiler actual)" || v= |
|
_p9k_cache_stat_set "$v" |
|
fi |
|
_p9k__ret=$_p9k__cache_val[1] |
|
} |
Upstream issue:
I'd say the
haskell_stackgimmick, while nicely displaying the ghc version if I am in a directory withstack.yaml, does a bit too much.stack.yaml, I am waiting a couple of seconds before my prompt appears.The reason is that
stackis slow, it does all kind of stuff before it gives the desired answer.stackis doing creating a.cabalfile from apackage.yamlfile (using its internal version ofhpack).This seems a bit too much. I do not want my shell prompt to create new files. I just want it to display information.
So my advice would be to switch this feature off until it gets fixed.
powerlevel10k/internal/p10k.zsh
Lines 5700 to 5714 in 36f3045
Upstream issue:
stack querygenerates a.cabalfile as side effect commercialhaskell/stack#6780