-
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
Figure out project initialization #253
Comments
I'm in favour of And Brainstorming: One point to consider is whether to make some of these commands interactive or not, with flags to make them not interactive. Part of what made everyone love using Darcs was its helpful interactive by default process, whereas Git requires a flag to be interactive. Anyway, the reason I bring it up is it makes it easier to have commands choose a codepath based on user feedback instead of trying to figure out the perfect behaviour for a command name or hiding behaviours in flags that might be missed. |
While generally I like the idea of stack not being interactive, specifically project initialization is a great place to change that and be as helpful/interactive as possible. |
Yes so long as the user is not asked too many questions. I find even Related: my fat fingers often |
Oh, that reminds me: I should have referenced #231. My proposal there was to not automatically create a stack.yaml file when there are no .cabal files found. |
On the topic of the last bullet point (falling back), this is what I would prefer to see. If it doesn't work with the snapshot specified in However, the
And I will throw out one more idea. It may be nice to have a command
And of course it would have the nightly stuff in there as well. You'd probably want a way to filter what it tries or how many it will try. |
+1 to:
|
@andrewthad Just to clarify on falling back, stack never does something different than what's in the config file. Fallback refers to when generating the config file itself. @chreekat That table really helps, thank you! I realize this is bike shedding, but I'll do it anyway: setup still feels more correct to me than init, since it's not just initializing things but properly installing. For both cabal and ghc-pkg, init has a much cheaper implication. Can those in favor of init explain why they prefer it? |
I actually have no preference on setup vs init; I was just following the On Wed, Jun 10, 2015 at 7:37 AM, Michael Snoyman [email protected]
|
Until this issue is resolved, is there any guide / example of what a brand new project looks like? I don't mind placing & editing files manually while tooling is getting going. Or should I make a traditional cabal project and convert that somehow? |
I agree with keeping |
There haven't been any comments for a few days, so I'll try to summarize the action items/deltas from current behavior:
If there are no objections, let's move ahead with implementing this. |
LGTM. Any interactive user input should be providable from the command line too, for scriptability. |
Agreed, good point. |
I think by default, it would be usefull to have |
OK, this is implemented, feedback welcome. The summary is that
And then the failure cases. I modified text.cabal to be incompatible with LTSes and NIghtlies:
If I don't hear any objections, I'll close this tomorrow. |
Does this address the bullet point from up top: |
No, that's being covered in #137 (input would be welcome over there, we're talking out how it should work right now). |
We have a number of different issues all touching on the topic of project initialization (#116 #137 #228 #229). I'd like to use this issue to take a step back and discuss goals at a higher level to try and come up with solution that addresses everything.
It seems like we have the following different use cases that are overlapping:
Possibly related ideas on the table already are:
stack new
create a complete project from a template, which addresses the "brand new project" casestack build
automatically creates a stack.yaml already, but additionally throw in astack init
command to be more explicit about it, and let that command have more flags to control behavior. @gregwebs brought up the idea of naming thisstack config
instead, and letting it double as a means of modifying an existing stack.yamlstack setup
will download and install GHC if missing. There was some discussion about that command name being confusingI think that summarizes the goals and proposals until now. Before diving into solving all of these things coherently, does anyone want to add more requirements to the mix?
(Assigning to myself to drive the discussion forward, but others should feel free to jump in, make decisions, and implement things.)
The text was updated successfully, but these errors were encountered: