unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Guix-devel Digest, Vol 37, Issue 133
       [not found] <mailman.6883.1469108183.26858.guix-devel@gnu.org>
@ 2016-07-21 13:42 ` David Craven
  2016-07-21 14:23   ` Leo Famulari
  2016-07-22  2:28   ` sorted inputs [was: Guix-devel Digest, Vol 37, Issue 133] Eric Bavier
  0 siblings, 2 replies; 6+ messages in thread
From: David Craven @ 2016-07-21 13:42 UTC (permalink / raw)
  To: guix-devel

> I don't think this needs to be a thing.  While I personally added the
> code in the cpan importer to sort inputs by name, I recognize that
> there are also valid reasons to not do that in some packages.  E.g.
> grouping a set of inputs that are all related to or required for some
> aspect of a package's functionality, etc.

1. A lint warning is just that a warning. I think in most cases there
is no reason
not sort them alphabetically.

2. The ordering may seem logical to the person who wrote the package initially,
but then the next person comes along and modifies it. Over time we get a mess
and whatever structure the initial author had in mind has disappeared.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix-devel Digest, Vol 37, Issue 133
  2016-07-21 13:42 ` Guix-devel Digest, Vol 37, Issue 133 David Craven
@ 2016-07-21 14:23   ` Leo Famulari
  2016-07-21 15:18     ` David Craven
  2016-07-22  2:28   ` sorted inputs [was: Guix-devel Digest, Vol 37, Issue 133] Eric Bavier
  1 sibling, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-07-21 14:23 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

On Thu, Jul 21, 2016 at 03:42:52PM +0200, David Craven wrote:
> 1. A lint warning is just that a warning. I think in most cases there
> is no reason
> not sort them alphabetically.
> 
> 2. The ordering may seem logical to the person who wrote the package initially,
> but then the next person comes along and modifies it. Over time we get a mess
> and whatever structure the initial author had in mind has disappeared.

For example, if there are some unusual native-inputs, it's nice to add a
comment exlaining what they are for. So, we end up with things like
this:

    (native-inputs
     `(("python2-nose" ,python2-nose)
       ("python2-mock" ,python2-mock)
       ;; For documentation
       ("python2-sphinx" ,python2-sphinx)
       ("python2-sphinx-rtd-theme" ,python2-sphinx-rtd-theme)
       ("python2-sphinx-repoze-autointerface" ,python2-sphinx-repoze-autointerface)
       ("python2-sphinxcontrib-programoutput" ,python2-sphinxcontrib-programoutput)
       ("texinfo" ,texinfo)))

I think that's a case where the knowledge embodied by the comments and
ordering is worth more than sorting alphabetically.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix-devel Digest, Vol 37, Issue 133
  2016-07-21 14:23   ` Leo Famulari
@ 2016-07-21 15:18     ` David Craven
  2016-07-21 15:51       ` Thompson, David
  0 siblings, 1 reply; 6+ messages in thread
From: David Craven @ 2016-07-21 15:18 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Some basic USE flags would be nice, even if it's just used for
documenting which configure-flags and inputs are needed for which
feature. I think this would also resolve the sorting inputs
alphabetically issue, since there would be real metadata there instead
of just a source comment.

> I think that's a case where the knowledge embodied by the comments and
> ordering is worth more than sorting alphabetically.

This requires python2-sphinx to be installed when building even if you
are not interested in the doc output.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix-devel Digest, Vol 37, Issue 133
  2016-07-21 15:18     ` David Craven
@ 2016-07-21 15:51       ` Thompson, David
  2016-07-21 16:02         ` David Craven
  0 siblings, 1 reply; 6+ messages in thread
From: Thompson, David @ 2016-07-21 15:51 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

On Thu, Jul 21, 2016 at 11:18 AM, David Craven <david@craven.ch> wrote:
> Some basic USE flags would be nice, even if it's just used for
> documenting which configure-flags and inputs are needed for which
> feature. I think this would also resolve the sorting inputs
> alphabetically issue, since there would be real metadata there instead
> of just a source comment.

USE flags a la Gentoo are not compatible with Guix because it means
that package expressions are no longer self-contained and rely upon
external global state.  That means that builds are no longer
deterministic.

When the result of building a package with all the bells and whistles
is too bulky, we make variants that are more stripped down.

> This requires python2-sphinx to be installed when building even if you
> are not interested in the doc output.

Which is fine.  When downloading a substitute of either output,
python2-sphinx shouldn't be referenced and thus does not need to be
installed.

- Dave

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix-devel Digest, Vol 37, Issue 133
  2016-07-21 15:51       ` Thompson, David
@ 2016-07-21 16:02         ` David Craven
  0 siblings, 0 replies; 6+ messages in thread
From: David Craven @ 2016-07-21 16:02 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

> USE flags a la Gentoo are not compatible with Guix because it means
> that package expressions are no longer self-contained and rely upon
> external global state.  That means that builds are no longer
> deterministic.

Build determinism is only relevant for binary caching so if someone
changes the default USE flags then he's building the packages
him/herself. Using different USE flags also would yield a different
build script so the mapping from .drv => binary would still be
deterministic.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sorted inputs [was: Guix-devel Digest, Vol 37, Issue 133]
  2016-07-21 13:42 ` Guix-devel Digest, Vol 37, Issue 133 David Craven
  2016-07-21 14:23   ` Leo Famulari
@ 2016-07-22  2:28   ` Eric Bavier
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Bavier @ 2016-07-22  2:28 UTC (permalink / raw)
  To: David Craven; +Cc: guix-devel

On Thu, 21 Jul 2016 15:42:52 +0200
David Craven <david@craven.ch> wrote:

> > I don't think this needs to be a thing.  While I personally added the
> > code in the cpan importer to sort inputs by name, I recognize that
> > there are also valid reasons to not do that in some packages.  E.g.
> > grouping a set of inputs that are all related to or required for some
> > aspect of a package's functionality, etc.  
> 
> 1. A lint warning is just that a warning. I think in most cases there
> is no reason
> not sort them alphabetically.

I'd like 'guix lint' to be useful to everyone, including first-time
contributors.  In that context, we can't have it start printing warnings
that we don't feel are legitimate issues, causing people to start
second-guessing and revisiting their contribution.  

One of the original motivators behind 'guix lint' was to catch issues
commonly encountered during patch review.  I've never seen a reviewer
on this list turn back a patch because the inputs were not sorted.

> 2. The ordering may seem logical to the person who wrote the package initially,
> but then the next person comes along and modifies it. Over time we get a mess
> and whatever structure the initial author had in mind has disappeared.

As David mentioned, with proper source comments this shouldn't be an
issue.

`~Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-22  2:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.6883.1469108183.26858.guix-devel@gnu.org>
2016-07-21 13:42 ` Guix-devel Digest, Vol 37, Issue 133 David Craven
2016-07-21 14:23   ` Leo Famulari
2016-07-21 15:18     ` David Craven
2016-07-21 15:51       ` Thompson, David
2016-07-21 16:02         ` David Craven
2016-07-22  2:28   ` sorted inputs [was: Guix-devel Digest, Vol 37, Issue 133] Eric Bavier

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).