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

a 'stack' project is created #96

Closed
int-index opened this issue Jun 26, 2018 · 5 comments
Closed

a 'stack' project is created #96

int-index opened this issue Jun 26, 2018 · 5 comments
Labels
question Ideas, discussions

Comments

@int-index
Copy link

I decided to give this tool a go and use it to create a new project. To my dismay it created a stack project instead of a cabal new-build project, so it appears I have to create my project by hand.

The reason I can't use stack is that I need Backpack.

@chshersh chshersh added the question Ideas, discussions label Jun 26, 2018
@chshersh
Copy link
Contributor

@int-index Thanks for your feedback! Could you please provide steps for creating project and specific problem?

When I create project with summoner (even with custom prelude chosen) I can build my project with both cabal new-build and stack at the same time. stack.yaml is created in addition to any other configuration files. So summoner supports both stack and cabal new-build at the same time without problems. If you don't want to maintain stack compatibility, you can just delete stack.yaml file.

@int-index
Copy link
Author

  1. summon created stack.yaml without asking me whether I need it and I immediately assumed it was a stack-based project. It's a bit strange to use a tool to generate files only to delete some of them later.

  2. Setup.hs was missing, although it's required for uploading to Hackage.

  3. the generated .travis.yml uses stack, but my project won't be buildable with stack (because of Backpack)

@chshersh
Copy link
Contributor

@int-index That's a fair point. So you're talking about better cabal support which makes a lot of sense in context of stack being one step behind cabal in supporting cabal format. I will breakdown your problem into smaller issues:

  1. Support building of project on Travis CI using cabal.
  2. Do not create stack.yaml if project can't be build with stack.

I'm not sure how CLI of summoner could look like. Should it be separate flag like --cabal | --stack | --both with --both by default or something else? And current code is not modular enough. So supporting either cabal or stack or both at the same time might become slight nightmare in code but that's manageable.

Re Setup.hs: I have several packages without Setup.hs and I'm able to build them with both cabal and stack and upload them to Hackage without any problems. Does it somehow related to the fact that you have Backpack package? Maybe Setup.hs is required for Backpack project? I never used Backpack by myself so I can't reasay much son about this.

@int-index
Copy link
Author

I will breakdown your problem into smaller issues

I agree with your breakdown, it's really two separate issues.

I'm not sure how CLI of summoner could look like.

Well, it already asks questions interactively, so asking what build tools to support doesn't sound too bad? With three answer options, cabal, stack, both. (It's also common to treat an empty line as the default answer, so it's enough to press Enter ↵ to choose both).

I have several packages without Setup.hs

Hm, they must have lifted this restriction, I guess. That's good to know, I never liked this file anyway.

@chshersh chshersh added this to the v1.1 Upgrade milestone Jul 15, 2018
chshersh pushed a commit that referenced this issue Jul 17, 2018
* [#96] Add option to choose cabal or stack or both

* Update README and CHANGELOG

* Fix review comments
@chshersh
Copy link
Contributor

@int-index You can try summoner-1.0.5:

Now you have an option to disable stack and Travis support for cabal is improved.

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

No branches or pull requests

2 participants