-
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
Print dependencies version in --version #2223
Conversation
i think it'd be great to only output all those other versions with the |
The way EDIT we could add |
ping @mgsloan, opinions on this? |
Cool, thanks for working on this @phadej I would really rather avoid a custom Setup.hs, but since you've already written it, I'm fine with keeping it. An alternative approach might be to use TH, and parse the versions out of I actually think this should be outputted at the top of every We don't need to have this information for stack because as long as the repo isn't dirty and it's on an existing commit (better yet, stable version). All bets of reproducibility are off when you have a dirty working copy, so we don't really need the info in that case. You can detect if it's built by |
@mgsloan, the custom Setup.hs is courtesy of ekmett libraries, would be handy if we start to write doctests. I guess you can build non-dirty non-weird-githash stack using different |
LGTM, thanks! |
Question: @phadej patch produces a
|
Hmm, the |
To clarify, the code compiles but produces a dead module. I get that error if I try loading that module by hand, but right now Cabal ignores it altogether, maybe because it doesn't have a valid source name. Dropping the lines producing I've now realized what motivated that code — that's coming from this doctests support code: That computes by hand the dependencies for the testsuite, so that it can... launch GHCi or something to run doctests. That explains a few other bits that were confusing me, down to listing testsuite dependencies for stack --version. But to be sure: I won't fault anybody even if he/she copy-pastes uses of Cabal, using that library isn't easy. EDIT: I finally confirmed that testsuites relying on that script have names without hyphens, avoiding this bug: https://github.com/ekmett/distributive/blob/master/distributive.cabal |
Addresses: #2222
I have no idea how to differentiate between whether package is build with
stack
orcabal
, and AFAICS you can screw dependencies with customstack.yaml
as well (not so easily though).The output of
--version
is now quite long, but OTOH, dunno if it used much for anything else then issue reporting?