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

cabal new-path #4661

Open
angerman opened this issue Aug 3, 2017 · 6 comments
Open

cabal new-path #4661

angerman opened this issue Aug 3, 2017 · 6 comments

Comments

@angerman
Copy link
Collaborator

angerman commented Aug 3, 2017

I find myself often needing paths for cabals new-build artifacts. stack has a path command, that allows to retrieve information about directories for the current setup.

A cabal new-path command providing similar functionality would be quite useful.

E.g.

cabal new-path --dist-dir would provide the directory that used to be dist for the current target. E.g. the one that cabal new-build would build by default.

This could of course be discriminated by target.

@hvr
Copy link
Member

hvr commented Aug 3, 2017

How does this relate/complement/interact/differ from #2771? (or why can't the functionality be provided by e.g. show-build-info --dist-dir?)

@alexbiehl
Copy link
Member

Check out #4220 too!

@angerman
Copy link
Collaborator Author

angerman commented Aug 3, 2017

Wow #4220 looks pretty much like this. #2771 looks also quite usable. I just don't think that bolting the path logic into the show-build-info is a good idea, that just hides it at an obscure location. new-path is pretty self explanatory, having to go through show-build-info feels whacky to me.

However, had I known of #2771, I might now have ended up implementing cabal doctest, but turned it around and made doctest consume the show-build-info instead, which I'm coming to believe is the better solution.

@hvr
Copy link
Member

hvr commented Aug 3, 2017

@angerman btw, implementing cabal doctest outside of new-build (i.e. in a way that cabal would be agnostic to it) would mean that you wouldn't be able to specify additional dependencies or flags for doctest, and so cabal couldn't help you solver & install additional dependencies. So I totally think that cabal doctest is the proper way to go forward.

@fgaz
Copy link
Member

fgaz commented Aug 6, 2017

See also #3850.

@jneira
Copy link
Member

jneira commented Dec 22, 2020

Last show-build-info work is in #6241, @angerman do you still think a separate command is still needed?

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

No branches or pull requests

6 participants