Skip to content

cabal init doesn't allow specifying an alternative location for GHC executable #5654

Closed

Description

@kozross

For many invocations of cabal, I can pass a -w argument to specify where GHC can be found, which is very useful if you have local GHCs set up in your home directory. However, cabal init doesn't allow this, instead opting to fail and complain about a missing GHC. Would it be possible to have cabal init accept a -w flag too?

Activity

  1. m-renaud commented on Nov 3, 2018

    @m-renaud
    Contributor

    +1. I just ran into this issue as well when taking a look at the end to end process to create a new project using cabal-install and a specific GHC version, you can see the steps I took here.

    At the bottom of the post I have a list of some changes that would really improve the experience, having cabal init accept -w is one of them. From what I can tell this could be as simple as having init create (or update) the cabal.project.local file to contain a with-compiler directive that the rest of the init process could use.

  2. added a commit that references this issue on Nov 3, 2018
    677ab0a
  3. hvr commented on Nov 3, 2018

    @hvr
    Member

    I've implemented this the simplest way I could think of in the PR at #5658

  4. 23Skidoo commented on Nov 3, 2018

    @23Skidoo
    Member

    Related: #4936, #4956.

  5. added 2 commits that reference this issue on Nov 5, 2018
    1916fca
    878642e
  6. added this to the 2.4.0.1 milestone on Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions