unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: "Ludovic Courtès" <ludo@gnu.org>, "Marius Bakke" <mbakke@fastmail.com>
Cc: Ricardo Wurmus <rekado@elephly.net>, 27271@debbugs.gnu.org
Subject: [bug#27271] Avoiding ‘propagated-inputs’ for Python dependencies
Date: Sat, 17 Jun 2017 10:40:51 +0200	[thread overview]
Message-ID: <5944EB13.5080100@crazy-compilers.com> (raw)
In-Reply-To: <8737b80xn7.fsf_-_@gnu.org>

Am 10.06.2017 um 15:39 schrieb Ludovic Courtès:
>> > I asked Hartmut about this during the python-build-system refactoring,
>> > and the counter-argument was that if package A and B depends on
>> > different versions of package C, odd failures could occur. I'm not
>> > convinced propagation sidesteps this problem, however:
>> >
>> > https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00856.html
> I think we’re in trouble anyway if multiple versions of a package end up
> in the dependency graph because that’s not something Python supports
> (the same is probably true for most languages, with the notable
> exception of Node.)

That's true, you will have trouble anyway.

But when adding the paths via .pth file, we will get more problems and –
even more important – these problems will not be reported. Obscure bugs
will the the result.

The Zen of Python [1] says:

Errors should never pass silently.

When using .pth-files, we will get a ot of silent errors.

Analysis
--------------

1. Paths searched for .pth files are processed in the order of sys.path
(PYTHONPATH)
2. Within each path, .pth files are processed alphabetically (see
site.addsitedir())
3. Within the .pth file, paths are processed in top-down order.

Let's assume, we add a file ".package-name.pth" to each package.

Now if a user installs packages AAA in his/her profile, AAA's
dependencies will be listed in ".AAA.pth". AAA depends on SOME-PACKAGE,
which at the time of AAA's installation is @>=1.0. Some time later, he
user installs package BBB, which requires SOME-PACKAGE @>=1.3.(being
backward-compatible with 1.0).

Since from guix's point of view AAA and BBB are not interfering, both
packages are installed fine. No warnings will be reported.

But BBB is bound to fail! .AAA.pth is always processed prior to
.BBB.pth, so SOME-PACKAGE will always be @1.0 - which is to old for BBB.


[1] https://www.python.org/dev/peps/pep-0020/

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

  reply	other threads:[~2017-06-17  8:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  9:22 bug#27271: [PATCH 0/4] Catch collisions at profile creation time Ludovic Courtès
2017-06-07  9:25 ` bug#27271: [PATCH 1/4] profiles: Represent propagated inputs as manifest entries Ludovic Courtès
2017-06-07  9:25   ` bug#27271: [PATCH 2/4] profiles: Manifest entries keep a reference to their parent entry Ludovic Courtès
2017-06-07  9:25   ` bug#27271: [PATCH 3/4] guix package: Always upgrade packages that have propagated inputs Ludovic Courtès
2017-06-07  9:25   ` bug#27271: [PATCH 4/4] profiles: Catch and report collisions in the profile Ludovic Courtès
2017-06-09  1:42 ` bug#27271: [PATCH 0/4] Catch collisions at profile creation time Ricardo Wurmus
2017-06-09  9:41   ` Ludovic Courtès
2017-06-09 20:32     ` Marius Bakke
2017-06-10 13:39       ` bug#27271: Avoiding ‘propagated-inputs’ for Python dependencies Ludovic Courtès
2017-06-17  8:40         ` Hartmut Goebel [this message]
2017-06-17  9:00         ` [bug#27271] " Hartmut Goebel
2017-06-17  9:28     ` [bug#27271] [PATCH 0/4] Catch collisions at profile creation time Ricardo Wurmus
2017-06-17 12:30       ` Ludovic Courtès
2017-06-21  9:07         ` bug#27271: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5944EB13.5080100@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=27271@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mbakke@fastmail.com \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).