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 cabal init application-dir to app, and source-dir to src. #6676

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

m-renaud
Copy link
Collaborator

@m-renaud m-renaud commented Apr 9, 2020

This sets the default directory for the main module as app/ (--application-dir=app) and library source files as src/ (--source-dir=src).

This avoids the problem described in #6150 of having a library and executable share the same hs-source-dirs. Even for just the executable case its best to have a separate directory because its likely that eventually code will be moved into internal libraries for testing (which should also have a separate hs-source-dirs).

Tested manually, both interactively and non-interactively.

This resolves #6150.


Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

@m-renaud m-renaud force-pushed the m-renaud-init-app-dir-default branch from f3e48e8 to f470eac Compare April 9, 2020 15:32
@m-renaud
Copy link
Collaborator Author

m-renaud commented Apr 9, 2020

Updated changelog.d/cabal-init as well.

@m-renaud m-renaud requested a review from phadej April 9, 2020 15:34
@phadej phadej merged commit 4d1dcd2 into haskell:master Apr 9, 2020
@m-renaud m-renaud deleted the m-renaud-init-app-dir-default branch April 9, 2020 18:59
@phadej phadej mentioned this pull request Jul 10, 2020
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cabal init should not use same hs-source-dirs when choosing "Library and Executable"
2 participants