guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: propagating inputs in ghc-* packages


From: Ricardo Wurmus
Subject: Re: propagating inputs in ghc-* packages
Date: Sun, 02 Oct 2016 06:21:37 +0200
User-agent: mu4e 0.9.16; emacs 25.1.1

Federico Beffa <address@hidden> writes:

>>> Ricardo Wurmus <address@hidden> writes:
>>>
>>>> Hi Guix,
>>>>
>>>> I’m in the middle of upgrading our Haskell packages.  (Actually, I’m
>>>> just yak shaving.  I need “pandoc-citeproc” for “r-knitr”…)
>>>>
>>>> I noticed that upgrading Haskell packages is a pain in the neck because
>>>> of propagated inputs.  It seems that not all packages have fully
>>>> declared dependencies and just work accidentally because of propagated
>>>> inputs of a related package.  This also makes upgrades more difficult
>>>> because I can get substitutes from Hydra that depend on older versions
>>>> of some Haskell packages.
>>>>
>>>> It looks like Haskell binaries actually embed references to other
>>>> Haskell packages, so I’m not sure we actually need to propagate anything
>>>> at all.  Could someone please confirm this?
>>>
>>> From what I recall, binary executables include references to packages,
>>> but libraries do not.  So, at least at the time I wrote the first
>>> version of the haskell-build-system, propagated inputs seemed to be
>>> necessary for packages providing libraries, but not for ones providing
>>> applications.
>>
>> Thanks for this comment.  With Eric Bavier’s patch this seems no longer
>> necessary.  I’ve already rebuilt a lot of Haskell packages without any
>> propagation (and some added inputs), and I’ve got working libraries and
>> executables.  I’m still rebuilding remaining Haskell packages but I’m
>> now convinced that propagation is no longer needed with the current
>> version of the build system.
>>
>> I’m preparing a patch to remove propagation from all Haskell packages.
>> Now the question is only whether to do this all in one patch or in one
>> patch per package… :)
>
> That sounds great! Just to be sure: you are saying that if you install
> any library (call it A) and the GHC compiler into your profile then you
> are able to compile your program (making use of library A) without
> also having to manually install any input of library A?

This seems to be the case.  Here is an example ghci session in which I’m
using “ghc-pandoc” as a library without having to install any of the
numerous inputs to “ghc-pandoc” (and their inputs):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./pre-inst-env guix environment --ad-hoc ghc ghc-pandoc
[…]
rekado in guix-wip [env]: ghci
GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
Prelude> import Text.Pandoc
Prelude Text.Pandoc> readMarkdown def "Hello"
Right (Pandoc (Meta {unMeta = fromList []}) [Para [Str "Hello"]])
Prelude Text.Pandoc> :q
Leaving GHCi.
rekado in guix-wip [env]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This looks good to me.  Did I misunderstand your query?

~~ Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]