Skip to content
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

Default to having stack ghci load no targets? #1307

Closed
mgsloan opened this issue Nov 8, 2015 · 2 comments
Closed

Default to having stack ghci load no targets? #1307

mgsloan opened this issue Nov 8, 2015 · 2 comments

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 8, 2015

Having stack ghci mean "attempt to load up all of the local packages" means that the default invocation of stack ghci often fails. The more packages you have, the more likely you are to run into incompatibilities between how they're built - see https://ghc.haskell.org/trac/ghc/ticket/10827 . Defaulting to loading everything is just asking for trouble.

This would make stack ghci behave pretty much like stack exec ghci. I think this is good, because folks probably don't know to use stack exec ghci when they just want to run ghci and be able to :m + their project's dependencies.

It seems people are caught by surprise when they need to mark some packages as extra-dep so that their projects work with stack ghci - #1154 #1243 . I think these would have been non-issues if it just required you to specify the components to load. We can also provide the current behavior by adding an --all flag.

If implemented, then this should happen in tandem with #1186 . This would be a deviation from stack build's default behavior, though (all libs and exes).

@ndmitchell
Copy link
Contributor

As the ghcid author, I want a way to load everything, since sometimes you want "bring everything in to scope and quickly check it compiles". I'm happy if that is a separate flag.

@mgsloan
Copy link
Contributor Author

mgsloan commented Nov 11, 2015

Now that I've added the build flags to ghci, I think the way to go is to follow the same convention as build for targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants