-
Notifications
You must be signed in to change notification settings - Fork 841
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
Smart behavior for exec/ghc/etc commands outside of a project #59
Comments
Assigned to @DanBurton, but feel free to push back on the plan here if you have different ideas. |
"Most recently used snapshot" seems like an easy thing to implement, but I'm not a big fan of using it for these use cases. I'd prefer to have the ability to specify a |
I think I'd rather see something slightly different used: a separate config file for this case that acts as the "exec outside a project" project file. That way we keep a clear distinction between project-specific and global config settings. That file could be automatically generated for the user. I'm still not completely on board with this being better, though. Being hidden away from the user, the user is unlikely to remember that this is being done for them, and won't think to look in ~/.stack to upgrade to a newer GHC or snapshot. |
Reassigning to @dysinger. We're going to start off with the design I originally laid out, and consider other improvements for future releases. |
Not my intention originally, but this paves the way quite nicely for implementing #59
Be sure to look at 36a6714, which includes a clean place to implement this. |
Not my intention originally, but this paves the way quite nicely for implementing #59
Title of this ticket says, "outside of a project". I do have a project, have I missed something? |
Project means a stack.yaml file, not a cabal file. On Mon, Jun 8, 2015, 1:48 AM Chris Allen [email protected] wrote:
|
@snoyberg ordinarily it creates a default one, why didn't it do so in this case? |
@bitemyapp That's the goal of the ticket: not to create spurious projects when you just want to run |
When running e.g. |
One other point: we should have some way of letting the user know that they're using the implicit global and how to change the snapshot it uses. |
A default gloabl config file were good . I pefered using stack to auto install ghc and packages automatic. so , when i need run ghci anywhere, I just want to type |
Implemented in afb074e. Now if I run
(Subsequent runs don't warn about this.) Then I can go ahead and change the resolver in my stack.yaml to be lts-2.9 (which is what my
And I can load up GHCi and load Lucid happily:
Alternatively, if I want a separate global snapshot, I want to use the latest 2.14 one, then I can install lucid into that instead:
|
This doesn't look right. Running |
Recent commits fixed all issues with this, closing. |
Desired behavior: you're working on a project that uses LTS 2.9. You leave that project and go to a directory which has no stack.yaml file. You run
stack runghc foo.hs
. Instead of using some random snapshot, it should use the most recently used snapshot (LTS 2.9) so that there's a good chance that your desired libraries are available. It should also print out a message to the user explaining what happened and recommending a config file for more determinism.The text was updated successfully, but these errors were encountered: