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

Fix macos ghcup and cabal flags (#4) #22

Merged
merged 1 commit into from
Jun 11, 2020
Merged

Conversation

hazelweakly
Copy link
Contributor

@hazelweakly hazelweakly commented Jun 9, 2020

  • fix short-circuit logic for ghcup based installs of ghc
  • fix unrecognized user-config option for cabal v2.0
  • update dependencies
  • skips cabal update if stack is enabled

closes #21
closes #20
closes #18

* fix short-circuit logic for ghcup based installs of ghc

* fix unrecognized user-config option for cabal v2.0

* update dependencies
@hazelweakly
Copy link
Contributor Author

@tclem looks like there have been a few things that needed fixing, but overall it seems the re-write has been quite stable :)

When you have time, can you look this over?

if (installedPath) {
// Make sure that the correct ghc is used, even if ghcup has set a
// default prior to this action being ran.
if (tool === 'ghc' && installedPath === ghcupPath)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice. Is it just on macOS that a default is set with ghcup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suspect it's just macOS currently, but this problem would also show up on any system where ghcup set was called. Wouldn't be terribly common, but I could envision a pipeline where someone used setup-haskell twice rather than a matrix? Either way, it's best to be robust and fix the actual underlying issue I think :)

const bin = await tc.downloadTool(
`https://downloads.haskell.org/~ghcup/${v}/x86_64-${
`https://downloads.haskell.org/ghcup/${v}/x86_64-${
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference with the ~ 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.

~ is the underlying url, I believe. I didn't know both worked until I saw that ghcup's documentation had started to use the new URL without the ~ in it, so I switched as well. They're identical in what they point to.

@tclem tclem merged commit c80f11a into actions:master Jun 11, 2020
@tclem
Copy link
Collaborator

tclem commented Jun 11, 2020

Moved the v1 tag forward as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants