Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Reverse use of Python/Ruby versions
Date: Mon, 10 Apr 2017 21:33:16
Message-Id: 20170411093058.41553e61@katipo2.lan
In Reply to: Re: [gentoo-dev] Reverse use of Python/Ruby versions by "William L. Thomson Jr."
1 On Mon, 10 Apr 2017 11:52:02 -0400
2 "William L. Thomson Jr." <wlt-ml@××××××.com> wrote:
3
4 > >
5 > > Meanwhile, you cannot build two parts of a given python dependency
6 > > chain with different pythons, nor different perls.
7 >
8 > True but this is not changing how things work, just reversing.
9
10 You mean going back to the old days where you'd upgrade Perl, and your system
11 would simply be broken, and you'd need to run some 3rd party tool outside of portage
12 to fix it, otherwise all your compiles would randomly break because portage had no
13 way of knowing that everything Perl based was now broken?
14
15 Or where we had python-updater for the same reasons?
16
17 TARGETS is a *solution* to these kinds of problems. Don't dismiss the solution
18 simply because you don't understand the problem in the first place.
19
20 Its not *ideal*, but its far better than things were.
21
22 We actually *do* have many users now having effortless upgrades as a result
23 of both targets and subslot usage, which you'd have us repeal.
24
25 1. Install new perl, subslots change, portage reinstalls everything
26 ( portage currently does a shit job though of getting this right in all cases,
27 but enough users have it JustWork and perl-cleaner is only necessary because they had
28 ages of old stuff that wasn't installed with subslot binding )
29 2. Globally change PYTHON_TARGETS, all things needed to be rebuilt with python get rebuilt.
30
31 "Lets not rebuild" is _not an option_. Not rebuilding is simply opting to
32 have a broken system.
33
34 You need to present a strategy for causing the rebuild, and presenting
35 a rebuild that doesn't result in end users having a fractal of brokenness.
36
37 And a "Supports everything by default, but then we mask things off as broken"
38 creates a "broken by default" system.
39
40 >
41 > > Right, but this is impossible with Ruby, Python, and Perl.
42 >
43 > It is done right now. The problem your describing exist now and is
44 > addressed. This would address it the same way but reversed.
45
46 Its *not* addressed now. For instance, if you recompile Perl with USE=threads
47 or USE=debug, you have to recompile literally every package you have installed.
48
49 We have no solution for this in place, and we have tempted the idea of a TARGETS
50 analogue for a few years now.
51
52 The only reason it *kinda* works now is because Perl's upstream takes massive efforts
53 to ensure that when they break things, the people whos shit got broken is fore-warned
54 of the impending doom, with aggressive smoke testing on the pre-releases.
55
56 Subsequently, the fact we don't already have Perl with TARGETS is simply because the breakage
57 is typically fixed upstream *before* it hits us.
58
59 If shit is broken sufficient that it won't work on a newer Perl, that's a tree breakge for us.
60
61 And its soley by the grace of God that such a thing has not been significant enough to cause a blocker yet.
62
63 Python and Ruby don't have any sort of culture to make this possible.
64
65 > > Perl *could* have targets, and some people think could do with it,
66 > > but it and java are very much in different boats.
67 >
68 > Easier to deal with as a user. Less work as a developer.
69
70 Which kind of user? The user who lives on the bleeding edge and doesn't mind randomly having
71 emerge break?
72
73 What about the audience of users who bitch every time we stabilize a new version of Perl, because
74 they're not ready for the changes?
75
76 Its a good thing nobody users Gentoo in production, because we move far too fast
77 for anyone to rely on our operating system for anything serious.
78
79 There's plenty of codebases out there that still require older versions of Perl, and
80 if the *massive* catastrophe of 5.26 doesn't abate, no doubt we'll need a way
81 to concurrently install multiple Perl versions to support a legacy audience.
82
83 And as soon as we have concurrent Perl versions available, a TARGETS analogue becomes a
84 *necessity*, portage has no alternative.
85
86 How else does portage understand the following facts:
87
88 X package exists
89 X package has 3 dependencies
90 X package needs Perl 5.26
91 X therefor needs all 3 dependencies to be installed on Perl 5.26
92
93 That is, you can either slot *every* package in tree for *every* perl there is and create
94 a *massive* maintainer burden ( read that as: I quit ), or you introduce targets, so that
95 portage can track the interconnectedness of packages and what they're installed on.
96
97 There's literally no other mechanism to do this at present.
98
99 Python used to have an ENV hack that was *like* targets, except portage couldn't see it,
100 and was basically just broken by design.
101
102 Thus, going back to the old way is "still have targets, just you're fucked if you expect portage to help you with
103 them and you'll need 3rd party tools and a daily battle with portage not understanding why its dependencies
104 are broken"
105
106 > Problem is simple, Targets are a PITA to deal with, ever changing. They
107 > lead to issues when you select incompatible ones or options. Best case
108 > wild card and let all install. But otherwise its a chore to deal with.
109 >
110 > > We only have 2 types of option at present from the users perspective,
111 > > "on" options, and "off" options.
112 >
113 > That sounds terrible. Lots of distros with things already turned
114 > on/off. Gentoo should never be one. USE flags can be a PITA, but they
115 > are a necessary evil. Its the ever changing TARGETS that are annoying,
116 > and cumbersome to users.
117
118 Read the rest of my comment. I said this is what we *currently* have.
119
120 It *IS* terrible. That's why I proposed an alternative.
121
122 We *currently* have a system of binary toggles, and our system basically forces users
123 to decide upon things, even if they don't care. And when packages conflict with things that
124 users don't care about, it forces them to care to flip the bit. ( And then later something
125 else forces them to unflip it, ad-infinitum )
126
127 End users don't care if mercurial needs 40 dependencies to have python 2.7 support enabled.
128
129 They just want to install mercurial and have portage do the leg work to make it happen.
130
131 Hence, the default should not be "Python 2.7 all the things!"... but it shouldn't be "fuck python2.7!" either.
132
133 The default should be "Portage can turn on Python2.7 support when its deemed necessary due to dependency chains,
134 but otherwise leave it off", and if users are sticklers about it, THEN they can set a hard line of "python 2.7 all the things"
135 or "no python2.7"
136
137 We currently have the worst of both worlds.
138
139 But please, actually understand the problem before attempting to tell us you don't like the solutions.