-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add project_configuration_tool option to template #21
Conversation
hooks/post_gen_project.py
Outdated
'{% if cookiecutter.use_hpack == "y" %} {{ cookiecutter.project_name }}.cabal {% endif %}', | ||
'{% if cookiecutter.use_hpack != "y" %} package.yaml {% endif %}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if I should do case insensitive match here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that would be better. I think, more importantly, it isn't ideal in the sense that it's not obvious which strings are allowed, and one can enter nonsense which will still pass. Maybe something like Choice Variables functionality might work better there, eg. it could be something like:
Select package description format:
1 - Cabal
2 - HPack
Choose from [1], 2:
What do you think? It's a bit more wordy, but at least it is obvious that it's a choice between two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree because the default is more obvious. I am just hoping I can make {{project_name}}.cabal
or package.yaml (hpack)
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled in e125757
@@ -26,6 +26,7 @@ let | |||
pkgs.haskellPackages.ghcid | |||
pkgs.haskellPackages.ormolu | |||
pkgs.haskellPackages.hlint | |||
{% if cookiecutter.use_hpack == "y" %}pkgs.haskellPackages.hpack{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nix build will pick this up automatically, but it would be nice to have in the shell for local dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it is definitely good to have. But even after this one needs to remember running hpack
every time after package.yaml
. So it would be great if we can also mention this on the README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled in 1aeab4d
Thanks for the PR! I just wanted to tell you that I am a bit busy this week, so I will review this over the weekend; but I will definitely get to this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I have a few comments, but otherwise happy to merge!
@@ -26,6 +26,7 @@ let | |||
pkgs.haskellPackages.ghcid | |||
pkgs.haskellPackages.ormolu | |||
pkgs.haskellPackages.hlint | |||
{% if cookiecutter.use_hpack == "y" %}pkgs.haskellPackages.hpack{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it is definitely good to have. But even after this one needs to remember running hpack
every time after package.yaml
. So it would be great if we can also mention this on the README.
@utdemir I believe I addressed all the issues you pointed out. Thanks for the great input! Also, if you have any other features in mind feel free to bother me about them. I plan to use this template for the foreseeable future and would be happy to dev on it. |
Thank you for the changes :). And I apologize for the late reply, I was a bit busy at work.
Well, one feature I'd really appreciate to have would be #19 , #18 , and similarly supporting benchmarks. I was also thinking about migrating to use I am also happy to make you a maintainer if you are planning to contribute, just let me know if you are keen. Thanks again! |
I don't mind at all! I'll likely pick up some of these issues soon. Thanks! |
Closes #20
project_configuration_tool
which writespackage.yaml
instead ofyour-project-name.cabal
project_configuration_tool
to hpack to test all configuration optionsstack new example-project
to approximate a minimalpackage.yaml
file with the changes you made in the cabal template