Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 635
    • Merge requests 635
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • 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

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