From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-54771-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 4EF45138010
	for <garchives@archives.gentoo.org>; Mon, 17 Sep 2012 10:56:44 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9638821C003;
	Mon, 17 Sep 2012 10:56:33 +0000 (UTC)
Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53])
	by pigeon.gentoo.org (Postfix) with ESMTP id CBF3021C004;
	Mon, 17 Sep 2012 10:55:33 +0000 (UTC)
Received: by vbbfc21 with SMTP id fc21so7236144vbb.40
        for <multiple recipients>; Mon, 17 Sep 2012 03:55:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :cc:content-type;
        bh=xkl2FbCPjEMjBLRU+Ds9nD7QPKLESmem1RKnCxRiL4g=;
        b=s6FDIR2m3S9SB2fmMEdhJO1HVER2sObmHmjQ2+e6zLi4y9sOt9/VUelDVGVMjixLLn
         SgC3nkKs4aO6kLkPH/9iEreaeONImTxq3SqFrCPlWwN9mVEHoup9wDUSlK+pde77zx+O
         JNA6rcO97ocOzd/ED0BbMvVrUNbpAoHYGnOouyQm4KsaWSsfGufhk7ZnOio1/VJygkkQ
         ILPwtoJ25p1+PMXL0XuMkRBQV5IaEOPBOU8JZQfaN/sNeWp1Ir93GS030sMbrDBmt3UX
         ZGrGm71oknl2WTOdV80EomQwv33VI3tVQXkbahdCJxXc2YieNgDOsZYQdAkmD9h06Gns
         pcqQ==
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.58.4.33 with SMTP id h1mr7562942veh.38.1347879333235; Mon, 17
 Sep 2012 03:55:33 -0700 (PDT)
Received: by 10.58.217.231 with HTTP; Mon, 17 Sep 2012 03:55:33 -0700 (PDT)
Received: by 10.58.217.231 with HTTP; Mon, 17 Sep 2012 03:55:33 -0700 (PDT)
In-Reply-To: <20120917030821.GA15027@localhost>
References: <20120916135211.GC23030@localhost>
	<CAMUzOag1GDyJYRZTDa6zfEgJfqM22mFZ+A9X+ka=HeUA-zq1Hg@mail.gmail.com>
	<20120917030821.GA15027@localhost>
Date: Mon, 17 Sep 2012 13:55:33 +0300
Message-ID: <CAMUzOai_uN1j3usM2JLxp7sfhCm_2Oip5_Ag9svJ2RuK_ByNTQ@mail.gmail.com>
Subject: Re: [gentoo-dev] GLEP: gentoo sync based unified deps proposal
From: Alex Alexander <alex.alexander@gmail.com>
To: gentoo-dev@lists.gentoo.org
Cc: gentoo-pms@lists.gentoo.org
Content-Type: multipart/alternative; boundary=047d7b5d8831db8c3504c9e39c68
X-Archives-Salt: be778117-1f91-4fc9-bc66-489663213c49
X-Archives-Hash: d065e4e15d06fb8b57123807441f3ecd

--047d7b5d8831db8c3504c9e39c68
Content-Type: text/plain; charset=ISO-8859-1

On Sep 17, 2012 6:13 AM, "Brian Harring" <ferringb@gmail.com> wrote:
>
> On Sun, Sep 16, 2012 at 07:32:39PM +0300, Alex Alexander wrote:
> >    On Sep 16, 2012 4:55 PM, "Brian Harring" <[1]ferringb@gmail.com>
wrote:
> >    >
> >    > Folks-
> >    >
> >    > Keeping it short and quick, a basic glep has been written for what
> >    I'm
> >    > proposing for DEPENDENCIES enhancement.
> >    >
> >    > The live version of the doc is available at
> >    >
> >    [2]
http://dev.gentoo.org/~ferringb/unified-dependencies/extensible_depe
> >    ndencies.html
> >
> >    Am I the only one who thinks that this dep:{build,...} thing looks
> >    really ugly and is hard to read?
> >
> >    IMO simply removing the "dep" part would greatly improve things:
>
> That 'dep' part isn't great, but it's added for a reason; to unify
> with USE_EXPAND/use group intended syntax.  There's a reference in
> there to
> http://www.gossamer-threads.com/lists/gentoo/dev/260069#260069 which
> I'll formalize soon enough.
>
>
> >    DEPENDENCIES="
> >    :build,run? ( ... )
> >    :run? ( ... )
> >    "
>
> For your suggestion, consider it if we *do* fxi USE expand- via using
> the same <namespace>:<setting> form.
>
> Using app-admin/mcollective ad an example, it's deps are thus:
>
> DEPEND="ruby_targets_ruby18? ( dev-lang/ruby:1.8 )
>         ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )"
> RDEPEND="dev-ruby/stomp
>         ruby_targets_ruby18? ( dev-lang/ruby:1.8 )
>         ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )"
>
> Which, if USE_EXPAND targets were groupped, would go from this
>   ruby_targets_ruby18? ( dev-lang/ruby:1.8 )
>   ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )
>   dep:run? ( dev-ruby/stomp )"
>
> to this:
>   ruby:targets_ruby18? ( dev-lang/ruby:1.8 )
>   ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 )
>   :run? ( dev-ruby/stomp )

Ok, now I get it. I've read the other threads as well, but failed to put it
all together. Happens when you barely sleep every night :-)

I don't like this mix of dependency types and use flag deps. It smells
trouble. Dependency types should be easy to separate and read, but the
above example is a mess, "dep:" or no "dep:".

Why? Because you have to scan the whole thing to sort out which lines are
dependency types and which lines are use deps and even then it would be
easy to misread something.

If we want to stay away from labels (which aren't that bad IMO), I'd
recommend the following instead:

Force explicit setting of the dependency type and disallow the mix of
dependency types and use flag deps at the same level / block.

DEPENDENCIES="
  :build,run? ( lib/foo )
  :run? (
    lib/bar
    someuseflag? ( random/app )
  )
  :*? (
    thing? (
      :build? ( lib/thing )
      :run? ( lib/thingrunner )
    )
"

Or, using your example:

:build,run? (
  ruby:targets_ruby18? ( dev-lang/ruby:1.8 )
  ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 )
)
:run? ( dev-ruby/stomp )

Alex | wired

--047d7b5d8831db8c3504c9e39c68
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>On Sep 17, 2012 6:13 AM, &quot;Brian Harring&quot; &lt;<a href=3D"mailto=
:ferringb@gmail.com">ferringb@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On Sun, Sep 16, 2012 at 07:32:39PM +0300, Alex Alexander wrote:<br>
&gt; &gt; =A0 =A0On Sep 16, 2012 4:55 PM, &quot;Brian Harring&quot; &lt;[1]=
<a href=3D"mailto:ferringb@gmail.com">ferringb@gmail.com</a>&gt; wrote:<br>
&gt; &gt; =A0 =A0&gt;<br>
&gt; &gt; =A0 =A0&gt; Folks-<br>
&gt; &gt; =A0 =A0&gt;<br>
&gt; &gt; =A0 =A0&gt; Keeping it short and quick, a basic glep has been wri=
tten for what<br>
&gt; &gt; =A0 =A0I&#39;m<br>
&gt; &gt; =A0 =A0&gt; proposing for DEPENDENCIES enhancement.<br>
&gt; &gt; =A0 =A0&gt;<br>
&gt; &gt; =A0 =A0&gt; The live version of the doc is available at<br>
&gt; &gt; =A0 =A0&gt;<br>
&gt; &gt; =A0 =A0[2]<a href=3D"http://dev.gentoo.org/~ferringb/unified-depe=
ndencies/extensible_depe">http://dev.gentoo.org/~ferringb/unified-dependenc=
ies/extensible_depe</a><br>
&gt; &gt; =A0 =A0ndencies.html<br>
&gt; &gt;<br>
&gt; &gt; =A0 =A0Am I the only one who thinks that this dep:{build,...} thi=
ng looks<br>
&gt; &gt; =A0 =A0really ugly and is hard to read?<br>
&gt; &gt;<br>
&gt; &gt; =A0 =A0IMO simply removing the &quot;dep&quot; part would greatly=
 improve things:<br>
&gt;<br>
&gt; That &#39;dep&#39; part isn&#39;t great, but it&#39;s added for a reas=
on; to unify<br>
&gt; with USE_EXPAND/use group intended syntax. =A0There&#39;s a reference =
in<br>
&gt; there to<br>
&gt; <a href=3D"http://www.gossamer-threads.com/lists/gentoo/dev/260069#260=
069">http://www.gossamer-threads.com/lists/gentoo/dev/260069#260069</a> whi=
ch<br>
&gt; I&#39;ll formalize soon enough.<br>
&gt;<br>
&gt;<br>
&gt; &gt; =A0 =A0DEPENDENCIES=3D&quot;<br>
&gt; &gt; =A0 =A0:build,run? ( ... )<br>
&gt; &gt; =A0 =A0:run? ( ... )<br>
&gt; &gt; =A0 =A0&quot;<br>
&gt;<br>
&gt; For your suggestion, consider it if we *do* fxi USE expand- via using<=
br>
&gt; the same &lt;namespace&gt;:&lt;setting&gt; form.<br>
&gt;<br>
&gt; Using app-admin/mcollective ad an example, it&#39;s deps are thus:<br>
&gt;<br>
&gt; DEPEND=3D&quot;ruby_targets_ruby18? ( dev-lang/ruby:1.8 )<br>
&gt; =A0 =A0 =A0 =A0 ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )&q=
uot;<br>
&gt; RDEPEND=3D&quot;dev-ruby/stomp<br>
&gt; =A0 =A0 =A0 =A0 ruby_targets_ruby18? ( dev-lang/ruby:1.8 )<br>
&gt; =A0 =A0 =A0 =A0 ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )&q=
uot;<br>
&gt;<br>
&gt; Which, if USE_EXPAND targets were groupped, would go from this<br>
&gt; =A0 ruby_targets_ruby18? ( dev-lang/ruby:1.8 )<br>
&gt; =A0 ruby_targets_ree18? ( dev-lang/ruby-enterprise:1.8 )<br>
&gt; =A0 dep:run? ( dev-ruby/stomp )&quot;<br>
&gt;<br>
&gt; to this:<br>
&gt; =A0 ruby:targets_ruby18? ( dev-lang/ruby:1.8 )<br>
&gt; =A0 ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 )<br>
&gt; =A0 :run? ( dev-ruby/stomp )</p>
<p>Ok, now I get it. I&#39;ve read the other threads as well, but failed to=
 put it all together. Happens when you barely sleep every night :-) </p>
<p>I don&#39;t like this mix of dependency types and use flag deps. It smel=
ls trouble. Dependency types should be easy to separate and read, but the a=
bove example is a mess, &quot;dep:&quot; or no &quot;dep:&quot;.</p>
<p>Why? Because you have to scan the whole thing to sort out which lines ar=
e dependency types and which lines are use deps and even then it would be e=
asy to misread something.</p>
<p>If we want to stay away from labels (which aren&#39;t that bad IMO), I&#=
39;d=A0 recommend the following instead:</p>
<p>Force explicit setting of the dependency type and disallow the mix of de=
pendency types and use flag deps at the same level / block.</p>
<p>DEPENDENCIES=3D&quot;<br>
=A0 :build,run? ( lib/foo )<br>
=A0 :run? ( <br>
=A0=A0=A0 lib/bar<br>
=A0=A0=A0 someuseflag? ( random/app )<br>
=A0 )<br>
=A0 :*? (<br>
=A0=A0=A0 thing? (<br>
=A0=A0=A0=A0=A0 :build? ( lib/thing )<br>
=A0=A0=A0=A0=A0 :run? ( lib/thingrunner )<br>
=A0=A0=A0 )<br>
&quot;</p>
<p>Or, using your example:</p>
<p>:build,run? (<br>
=A0 ruby:targets_ruby18? ( dev-lang/ruby:1.8 )<br>
=A0 ruby:targets_ree18? ( dev-lang/ruby-enterprise:1.8 )<br>
)<br>
:run? ( dev-ruby/stomp )</p>
<p>Alex | wired</p>

--047d7b5d8831db8c3504c9e39c68--