Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set STACK_ROOT=C:\sr #1042

Open
hasufell opened this issue Apr 23, 2024 · 2 comments
Open

Set STACK_ROOT=C:\sr #1042

hasufell opened this issue Apr 23, 2024 · 2 comments

Comments

@hasufell
Copy link
Member

https://docs.haskellstack.org/en/stable/stack_root/

On Windows, the length of filepaths may be limited (to MAX_PATH), and things can break when this limit is exceeded. Setting a Stack root with a short path to its location (for example, C:\sr) can help.

We will have to do that in: https://github.com/haskell/ghcup-hs/blob/master/scripts/bootstrap/bootstrap-haskell.ps1

@hasufell
Copy link
Member Author

It is possible that this change causes large breakage, e.g. for github runners, which use ghcup for provisioning: https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-Haskell.ps1

It doesn't appear to install stack, nor does it set STACK_ROOT. It also doesn't seem to use our bootstrap script anymore, so that seems like at least github won't be affected.

Opinions @mpilgrem?

@mpilgrem
Copy link
Contributor

mpilgrem commented Apr 23, 2024

@hasufell, I am a little lost as to the question I might be able to help with. However: Windows does (by default; it can be removed on Windows 10 and 11) have a maximum path length; Stack tries to keep paths short on Windows (by using hashes); and Stack's binary installer for 64-bit Windows sets STACK_ROOT to C:\sr by default (see etc/scripts/build-stack-installer.hs about line 57; EDIT now documented online).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants