guix-devel
[Top][All Lists]
Advanced

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

Re: Python and propagation


From: Andreas Enge
Subject: Re: Python and propagation
Date: Thu, 18 Feb 2016 16:03:56 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

Just a quick reply to the first part of your message, as I do not have
time to read more right now ;-)

On Thu, Feb 18, 2016 at 03:45:36PM +0100, Ricardo Wurmus wrote:
> I think this might have to operate on the bag.  I’m not sure if a Python
> package can (or should be able to expect to) import a package that it
> has not declared as a direct input.  So far we have just propagated
> inputs, which makes it unclear if an input in the bag is really directly
> used by the Python package itself.
> 
> If we only used direct inputs (each of which would alter the “sys.path”
> for its own needs on load) we would probably have to clean up the inputs
> of many Python packages, because we can no longer rely on the
> side-effect of propagation (which blurs the line between what a package
> is and what a bag is).  I would consider this a good thing, but it
> sounds like a lot of work.

I think this is a good thing.

If package A has package B as an input, and B has package C as a propagated
input, then C should only be used from inside B.

If A also needs C directly, it should be declared (also) as a direct input
of A. By accident, it is true that things work without since A, B and C
all live in the same world eventually, but logically this is not what
propagated inputs are for.

So if we discover such cases, I would consider them as bugs, and needing
to fix them can be seen as a nice side-effect of the proposed change.

Andreas




reply via email to

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