[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: merge wip-haskell?
From: |
Jakub Kądziołka |
Subject: |
Re: merge wip-haskell? |
Date: |
Fri, 7 Aug 2020 18:55:24 +0200 |
On Fri, Aug 07, 2020 at 06:27:21PM +0200, Ricardo Wurmus wrote:
>
> Jakub Kądziołka <kuba@kadziolka.net> writes:
>
> > On Thu, Aug 06, 2020 at 10:13:46AM +0200, Ricardo Wurmus wrote:
> >> Number 4 is by far the ugliest change of them all. In order to
> >> statically link packages we need to add all the “static” outputs of all
> >> Haskell inputs *and* the “static” outputs of *their* Haskell inputs.
> >> This is not easily accomplished, so I ended up using “package-closure”
> >> on all direct inputs, and then filtered the result to packages with
> >> names starting with “ghc-”. If there was a more appropriate tool I’d
> >> use it, but I don’t think it exists.
> >
> > Perhaps we should work on making propagated-inputs per-output? That way,
> > :static could propagate the :static output of the dependencies.
> >
> > This would also be useful in other situations. For example, a package
> > might contain both a binary and a library, and the library must
> > propagate its dependencies to make the header files work.
> >
> > I don't know what a good syntax for this would be.
>
> The binary / library problem is particularly interesting to me as we
> have a few Python bioinfo tools that also work as libraries. When used
> as a library we need propagation, but when uses as command line tools
> propagation is not needed (and can be harmful due to the effects on
> PYTHONPATH).
>
> Syntax seems less important than verifying that this actually works,
> though.
One still needs to pick a variant, even at random, to begin
implementation, which is hard when no options have been suggested :)
I suppose that we could add a list of outputs each propagated-input
applies to, putting it after the package and its output?
(this is unambiguous as we can check whether the third element of the
list is a string, or a list)
(propagated-inputs
`(("foo-static" ,foo "static" ("static"))
("bar" ,bar ("static"))))
However, this has the issue of being somewhat ad-hoc, and other
extensions to the list of inputs might become troublesome. This
motivates my second proposal:
(propagated-inputs
`(("foo-static" ,foo "static" #:propagate-to ("static"))
("bar" ,bar #:propagate-to ("static"))))
On the other hand, this variant feels somewhat over-engineered. After
all, we can always change the syntax if it becomes actually necessary.
There's also the option of adding another field to the package record:
(propagated-inputs-for-outputs ;; name up to bikeshedding :)
`(("static"
(("foo-static" ,foo "static")
("bar ,bar)))))
> Alas, as someone who has committed and encouraged syntactic
> crimes with excessive reader macros, I think my vote on syntax carries
> no weight :)
Well, the number of reader macro crimes encouraged seems to correlate
with experience, so I would still like to ask for your opinion.
Regards,
Jakub Kądziołka
signature.asc
Description: PGP signature
- Re: merge wip-haskell?, (continued)
- Re: merge wip-haskell?, Ricardo Wurmus, 2020/08/07
- Re: merge wip-haskell?, John Soo, 2020/08/07
- Re: merge wip-haskell?, Ludovic Courtès, 2020/08/24
- Re: merge wip-haskell?, Ricardo Wurmus, 2020/08/24
- Re: merge wip-haskell?, Ludovic Courtès, 2020/08/28
- Re: merge wip-haskell?, John Soo, 2020/08/28
- Re: merge wip-haskell?, Timothy Sample, 2020/08/28
- Re: merge wip-haskell?, Timothy Sample, 2020/08/29
- Re: merge wip-haskell?, John Soo, 2020/08/29
Re: merge wip-haskell?, Ricardo Wurmus, 2020/08/07
- Re: merge wip-haskell?,
Jakub Kądziołka <=