From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: Python and propagation Date: Thu, 18 Feb 2016 16:03:56 +0100 Message-ID: <20160218150356.GA1718@solar> References: <20160218142823.GA1618@solar> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWQ7k-0002Qj-8R for guix-devel@gnu.org; Thu, 18 Feb 2016 10:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWQ7e-0007BH-NU for guix-devel@gnu.org; Thu, 18 Feb 2016 10:04:08 -0500 Received: from mailrelay6.public.one.com ([91.198.169.200]:33632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWQ7e-0007Aj-A2 for guix-devel@gnu.org; Thu, 18 Feb 2016 10:04:02 -0500 Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel 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