New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A project named 'interactive' fails to build #3172

Closed
th0br0 opened this Issue May 12, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@th0br0

th0br0 commented May 12, 2017

General summary/comments (optional)

A project called 'interactive' causes a silent error while constructing the build plan:

Error: While constructing the build plan, the following exceptions were encountered:

Plan construction failed.

Steps to reproduce

  1. stack new interactive
  2. cd interactive
  3. stack build

Expected

Stack builds the project

Actual

Stack fails to create the build plan without printing an error

Stack version

$ stack --version
Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd (4640 commits) x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@Blaisorblade

This comment has been minimized.

Collaborator

Blaisorblade commented May 21, 2017

The log with -v doesn't help, and my cabal builds the project successfully:
https://gist.github.com/Blaisorblade/ce104829aad5260823d82bf44fbd4af9

And the generated files look fine.

But "interactive" is a wired-in package according to sources of both Stack (see src/Stack/Constants.hs) and Cabal, both in 7.10.1 and 8.0.2:

https://downloads.haskell.org/~ghc/7.10.1/docs/html/libraries/ghc/src/Module.html#integerPackageKey
https://downloads.haskell.org/~ghc/8.0.2/docs/html/libraries/ghc-8.0.2/Module.html

I'm not sure what "interactive" is supposed to be; since other wired-in packages seem GHC dependencies, I'm guessing this might have to do with ghci. Maybe the name is outdated. No real clue.

If interactive is not a real wired-in package, maybe removing the mention of "interactive" from src/Stack/Constants.hs would allow the package to build without other changes, but I'm somewhat clueless.

@Blaisorblade Blaisorblade added this to the P2: Should milestone May 21, 2017

mgsloan added a commit that referenced this issue Jun 11, 2017

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Jun 11, 2017

Not sure what it is used for either, but it's probably best to be consistent here. I've committed a fix - stack new interactive (and other wired in packages) will now fail with

The name "interactive" is used by GHC wired-in packages, and so shouldn't be used as a package name

For build, the output is now

Error: While constructing the build plan, the following exceptions were encountered:

Can't build a package with same name as a wired-in-package: interactive

@(Stack/Build/ConstructPlan.hs:227:13)
Plan construction failed.
*** Exception: ExitFailure 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment