Skip to content

Adapt existing Haskell Stack example for Windows #819

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

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

mpilgrem
Copy link
Contributor

The default STACK_ROOT is ~/.stack only on Unix-like operating systems. On Windows, the default is %APPDATA%/stack (usually %HOME%\AppData\Roaming\stack).

On Unix-like OSs, Stack stores GHC and other tools in a programs directory in the STACK_ROOT. On Windows, Stack stores those tools and MSYS2 in %LOCALAPPDATA%\Programs\stack (usually %HOME%\AppData\Local\Programs\stack).

@mpilgrem mpilgrem requested a review from a team as a code owner June 12, 2022 15:51
@Phantsure
Copy link
Contributor

@mpilgrem %HOME%\AppData\Roaming\stack is stack root? Their docs website seem to mention just one path for two things mentioned by you on windows. Here: https://docs.haskellstack.org/en/stable/GUIDE/#path

@mpilgrem
Copy link
Contributor Author

@Phantsure, if environment variable STACK_ROOT is not set, %HOME%\AppData\Roaming\stack is the stack root. The location of GHC or other tools is documented here: https://docs.haskellstack.org/en/stable/faq/#can-i-change-stacks-default-temporary-directory. On Unix-like operating systems, that location is a subdirectory of the stack root. On Windows, it is outside of the stack root.

examples.md Outdated
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- uses: actions/cache@v3
Copy link
Contributor

@Phantsure Phantsure Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this separate for windows and unix systems, like done here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Phantsure, can I double-check the intended URL behind the 'here'?

Copy link
Contributor

@Phantsure Phantsure Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Phantsure, I'll revise the PR to reflect that.

The default `STACK_ROOT` is `~/.stack` only on Unix-like operating systems. On Windows, the default is `%APPDATA%/stack` (usually `%HOME%\AppData\Roaming\stack`).

On Unix-like OSs, Stack stores GHC and other tools in a `programs` directory in the `STACK_ROOT`. On Windows, Stack stores those tools and MSYS2 in `%LOCALAPPDATA%\Programs\stack` (usually `%HOME%\AppData\Local\Programs\stack`).
@mpilgrem mpilgrem force-pushed the haskell-stack-example branch from 9295c91 to d25c51b Compare June 21, 2022 12:18
@Phantsure Phantsure merged commit afc669e into actions:main Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants