Skip to content

stack path is slower than usual #3446

@fredefox

Description

@fredefox

General summary/comments (optional)

Running stack path --compiler-bin prompts stack to start "Populating index cache" this is new behavior and didn't happen before. The issue for me is that I use this command in my shells login-script and it slows down initialization considerably.

My issue could be worked around if the stack installation maintained setting global environment variables.

I also do realize that this is perhaps not a standard use-case, however, I would like to have the programs that stack installs (ghc etc.) globally available and this is how I did this.

Steps to reproduce

For example:

  1. Log in to a new shell.
  2. Run command stack path --compiler-bin or simply stack path.

Expected

The path is printed immediately.

Actual

It prints

"Populating index cache ... <delete line character / CR?>
Populated index cache."

Stack version

$ stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1

Method of installation

I believe I used the one-liner from this site https://docs.haskellstack.org/en/stable/install_and_upgrade/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions