Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general-concepts/slotting: New 'Considerations for slotting' section #363

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thesamesam
Copy link
Member

This is a section I've been wanting to write for quite some time and formalises a talk I've had to give many contributors.

Slotting is a powerful tool but easy to abuse and there's a number of non-obvious pitfalls that we should document: attempt to do that here.

This is a section I've been wanting to write for quite some time and
formalises a talk I've had to give many contributors.

Slotting is a powerful tool but easy to abuse and there's a number of
non-obvious pitfalls that we should document: attempt to do that here.

Signed-off-by: Sam James <[email protected]>
@thesamesam
Copy link
Member Author

thesamesam commented Dec 16, 2024

Not done a pass for formatting yet. Looking more for feedback on the higher-level layout and missing content (I suspect there's some more which will come to me shortly).

@SoapGentoo
Copy link
Member

thanks for providing something we can use as a reference for people suggesting slotting

@CheyenneWills
Copy link

I don't have anything that creates a slotted install, but slots are very helpful and I do use slotted compilers (gcc and clang) quite a bit for testing.

Would be nice to have a bit more standardized way of selecting the binary for slotted commands -- for example:

gcc -- gcc-config
clang -- env.d tricks
python - eselect

@thesamesam
Copy link
Member Author

thesamesam commented Dec 16, 2024

Yeah, it's worth us listing methods for the binary itself (and maybe mentioning environment variables too and python-exec).

For libraries: we should perhaps mention things like PKG_CONFIG_PATH as we do for Guile too.

I should also mention that for cases where it really is a leaf package, all we really need to do is maybe have an eselect, nothing else, and those are really the ideal cases for slotting.

@eli-schwartz
Copy link
Member

gcc -- gcc-config

or eselect gcc :)

</p>

<p>
Before proceeding at all, consider the impact on the wider ecosystem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you're repeating "consider the impact".

<p>
Before proceeding at all, consider the impact on the wider ecosystem
beyond Gentoo. Especially examine other distributions and their handling
of the problem in question. Gentoo cannot unilaterally move software to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, technically speaking it can. I think the point's more like "it's not always a good idea".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, that just rather weakens the rhetoric. Can you suggest some alternative phrasing that retains some punch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Unilaterally moving software can have devastating consequences for …" (users? other developers?)

</p>

<ul>
<li>how does this software use this package;</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Software" and "package" here can be ambiguous.

Comment on lines +66 to +67
Do not be fooled by the ease in adapting the package itself to slotting:
slotting the package itself is always the easiest part.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "always" is too strong here. How about

Suggested change
Do not be fooled by the ease in adapting the package itself to slotting:
slotting the package itself is always the easiest part.
Do not be fooled by the ease in adapting the package itself to slotting:
slotting the package itself is often the easiest part.

or

Suggested change
Do not be fooled by the ease in adapting the package itself to slotting:
slotting the package itself is always the easiest part.
Do not be fooled by the ease in adapting the package itself to slotting:
slotting the package itself may well be the easiest part.

?

</p>

<p>
Before proceeding at all, consider the impact on the wider ecosystem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really dislike that "ecosystem" metaphor in computing (especially in free-software) context. It is a fuzzy and ambiguous term.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you suggest an alternative? In this case, I really want people to think "how is this going to affect other people", and "is there a thing this is going to break far beyond Gentoo"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Before proceeding, consider the wider implications beyond Gentoo."

be naively slotted by just adapting the package itself. Other packages
must be primed to handle a slotted world: an eclass mechanism usually needs
to exist for packages to declare which versions they support, as well as
force building against the version currently depended on to avoid automaigc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo:

Suggested change
force building against the version currently depended on to avoid automaigc
force building against the version currently depended on to avoid automagic

</p>

<p>
Ecosystems that lend themselves to slotting, such as Guile or Lua, cannot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ecosystems that lend themselves to slotting, such as Guile or Lua, cannot
Systems that lend themselves to slotting, such as Guile or Lua, cannot

<p>
Ecosystems that lend themselves to slotting, such as Guile or Lua, cannot
be naively slotted by just adapting the package itself. Other packages
must be primed to handle a slotted world: an eclass mechanism usually needs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"World" has a specific meaning in Gentoo context, maybe better avoid?

Comment on lines +135 to +136
<body>
<p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line before <p> please.


<p>
An <c>eselect</c> module is often made available for these cases, though
ebuilds normally shouldn't depend its use.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the word "on" missing here?

explicitly intend (major) versions to be installable in parallel. The
presumption should be that a library cannot be slotted until proven otherwise.
</p>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dev-java/bcprov regarded a library? If so, what' should have been the alternative to slotting in commit 901da76177 followed-up by commit 154e9224cf, all was done according to this wiki article?

Copy link
Member

@Flowdalic Flowdalic Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say (pure) Java libraries are by construction intended to be installable in parallel (they are usually not meant to be consumed in parallel, but that is unrelated to slotting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants