Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Add stack-root output #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add stack-root output #35

wants to merge 2 commits into from

Conversation

avh4
Copy link

@avh4 avh4 commented Sep 12, 2020

stack-root is where snapshot dependencies are stored, and this path is commonly needed when enabling caching. Adding it as an output to setup-haskell allows the client projects to not have to worry about the platform-specific logic to determine which path should be cached.

@avh4 avh4 force-pushed the stack-root-output branch from 308d267 to b28505f Compare September 12, 2020 07:51
exec('stack', ['setup', opts.ghc.resolved])
);
await core.group('Pre-installing GHC with stack', async () => {
await exec('stack', ['setup', opts.ghc.resolved]);
Copy link
Contributor

Choose a reason for hiding this comment

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

This codepath isn't executed every time stack is installed. The action first checks to see if the tool already exists, and if so, exits early. The success function in src/installer.ts is responsible for setting this up correctly and is probably the best place to put this logic.

I'm glad this was submitted, though! Walking through the code helped me realize that I had placed some stack specific code beyond the early exit codepath, making it (probably) possible to end up with a windows system without STACK_ROOT set correctly.

mihaimaruseac added a commit to mihaimaruseac/hindent that referenced this pull request Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants