Issue 2503 Use of externalPackageDeps in Setup is bad

Title Use of externalPackageDeps in Setup is bad
Priority Status unknown
Milestone Resolved in
Superseder Nosy List ezyang
Assigned To

Created on 2016-07-22.06:14:11 by ezyang, last changed 2017-08-12.20:42:40 by bf.

msg19235 (view) Author: ezyang Date: 2016-07-22.06:14:09
In Setup you have:

    ["module Version where"
    ,"builddeps, version, context :: String"
    ,"version = \"" ++ version ++ " (" ++ state ++ ")\""
    ,"builddeps = " ++ show ( formatdeps (externalPackageDeps lbi))
    ,"context = " ++ case ctx of
                       Just x -> show x
                       Nothing -> show "context not available"

The use of `externalPackageDeps` here is bad juju. It is the deps for ALL 
components, including the test suite. I doubt you want to build Darcs with the test 
suite dependencies in build deps.

If it's just library deps you care about here (which is probably the case), you can 
use `getComponentLocalBuildInfo` to grab the `CLibName` component, and then read 
the deps off that.
msg19257 (view) Author: ganesh Date: 2016-09-04.15:59:21
Thanks for the spotting that! I think the list is just 
informational, to be used in the output of 'darcs --exact-version', 
but it would still be better not to include the test suite 
dependencies. In theory we would want the executable dependencies 

Looking at the ouput, I also notice it's only the direct 
dependencies. Ideally we'd find a way to include the indirect 
dependencies too.
msg19568 (view) Author: bf Date: 2017-08-12.20:42:39
getComponentLocalBuildInfo is now deprecated and the docs explaining the
deprecation are so confusing that I am not sure what to do.
Date User Action Args
2016-07-22 06:14:11ezyangcreate
2016-09-04 15:59:23ganeshsetmessages: + msg19257
2017-08-12 20:42:40bfsetmessages: + msg19568