Re: The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)

2023-08-07 Thread Attila Lendvai
> How about 'package/variant' or 'package/variant-of'?

+1 for trying to capture the intention in the name, instead of the means of 
implementation.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Although teachers do care and do work very, very hard, the institution is 
psychopathic-it has no conscience. It rings a bell and the young man in the 
middle of writing a poem must close his notebook and move to a different cell 
where he must memorize that humans and monkeys derive from a common ancestor.”
— John Taylor Gatto (1935–2018), 'Dumbing Us Down: The Hidden 
Curriculum of Compulsory Education' (1992)




Re: The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)

2023-08-06 Thread (
Tobias Geerinckx-Rice  writes:
> But I'll gladly judge other bikesheds if they lead to a less misleading name.

How about 'package/variant' or 'package/variant-of'?

  -- (



Re: The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)

2023-03-07 Thread Simon Tournier
Hi,

On Fri, 03 Mar 2023 at 20:21, Tobias Geerinckx-Rice  wrote:

> Could we rename it to something like 
> ‘package+replacements/inherit’?  To me, that captures the spirit, 
> without being overly longer.

Well, I gave a look at the code and have seen the replacement.  But I
had not thought about the package transformation and the like.

>From my point of view, the best would to add a paragraph with index
entries under “Defining-Package-Variants” section [1].

However, in the light of Maxim’s explanations, the example from the
manual appears to me inconsistent:

--8<---cut here---start->8---
You can just as well define variants with a different set of
dependencies than the original package.  For example, the default
@code{gdb} package depends on @code{guile}, but since that is an
optional dependency, you can define a variant that removes that
dependency like so:

@lisp
(use-modules (gnu packages gdb))   ;for 'gdb'

(define gdb-sans-guile
  (package
(inherit gdb)
(inputs (modify-inputs (package-inputs gdb)
  (delete "guile")
@end lisp
--8<---cut here---end--->8---

Well, since the trap is not completely clear for me yet, I am not able
to propose a paragraph.  IMHO, a paragraph here would help in mitigating
the trap.  Whatever the name of ’package/inherit’. :-)

1: 


Cheers,
simon




The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)

2023-03-03 Thread Tobias Geerinckx-Rice

Hi!

Maxim Cournoyer 写道:

Simon Tournier  writes:
It is not clear for me why you choose one over the other.  From 
my

current understanding, I would be tempted to always use
'package/inherit' and never plain 'inherit'.


I also got confused by that in the past;


Same.  I think it's a rite of passage.  A questionable one.


The way I process it internally now is this:

If the inheritance is for *same-source/same-version* variants of 
a
package, they should use package/inherit, as any security issues 
found
in the parent package should also be applied to that package 
(since they

use the same source).  Otherwise, plain 'inherit' should be used
(e.g. for newer version variants).


That about jives with my intuition.

Judging by the (IMO) universal confusion this causes, it is (IMO) 
spectacularly poorly-named.  A docstring doesn't fix that.


Could we rename it to something like 
‘package+replacements/inherit’?  To me, that captures the spirit, 
without being overly longer.


But I'll gladly judge other bikesheds if they lead to a less 
misleading name.


Kind regards,

T G-R


signature.asc
Description: PGP signature