Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,243
    • Issues 5,243
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20074
Closed
Open
Issue created Jul 04, 2021 by Michael Snoyman@snoyberg

Missing ghc-9.0.1.exe executable in bindist

Summary

The GHC bindist for Windows for 9.0.1 includes a ghc.exe file, but not a ghc-9.0.1.exe file. Previous versions of GHC included both. This change confuses Stack's executable detection mechanism in some cases, specifically when a different ghc-9.0.1.exe is on the PATH, as occurs for example with GitHub Actions.

Steps to reproduce

Unpacking the GHC bindist will demonstrate the lack of file. To demonstrate the bug triggered in Stack:

  1. Place a dummy file ghc-9.0.1.exe somewhere on the PATH
  2. Run stack setup ghc-9.0.1 (tested using Stack 2.7.1)
  3. Installation will fail with an error such as:
Found an invalid compiler at "C:\\Users\\snoyb\\.cargo\\bin\\ghc-9.0.1.EXE": UnliftIO.Exception.throwString called with:

Could not find any of: ["C:\\Users\\snoyb\\.cargo\\bin\\ghc-pkg-9.0.1.EXE","C:\\Users\\snoyb\\.cargo\\bin\\ghc-pkg.exe"]

Expected behavior

It would be ideal to continue including the ghc-9.0.1.exe executables. In the meantime, however, I intend to modify Stack's installer logic to deal with both cases.

Environment

  • GHC version used: 9.0.1

Optional:

  • Operating System: Windows
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking