-
-
Notifications
You must be signed in to change notification settings - Fork 163
[RFC 0046] Platform Support Tiers #46
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
Changes from 2 commits
ffdb91d
fac98e8
54c4a0c
11bfe17
b597b2b
45da830
01326f3
0b9b6e6
8800b51
fb42003
93cda2f
ab2a70d
0d1cc20
e7f66a8
ee057bc
0c9462f
ebd6091
a288307
f053b7a
a259e1a
8ec08fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| --- | ||
| feature: platform_support_tiers | ||
| start-date: 2019-04-28 | ||
| author: Michael Raskin | ||
| co-authors: | ||
| related-issues: | ||
| --- | ||
|
|
||
| # Summary | ||
| [summary]: #summary | ||
|
|
||
| Document the way to describe the level of support a platform can expect in | ||
| Nixpkgs. | ||
|
|
||
| # Motivation | ||
| [motivation]: #motivation | ||
|
|
||
| When adding a new platform, be it a new C library option, a new | ||
| cross-compilation target configuration or a new CPU architecture, there is a | ||
| discussion of support expectations and maintenance burden. Having a documented | ||
| vocabulary to describe the expectations and documented precedents should make | ||
| such discussions more efficient. | ||
|
|
||
| # Detailed design | ||
| [design]: #detailed-design | ||
|
|
||
| ## Platform elements | ||
|
|
||
| * CPU architecture (possibly: subarchitecture, optional features) | ||
| * OS kernel | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned in 54, I believe the phrase "OS ABI" is more accurate than "OS kernel" in this context. It may seem like a minor nitpick now, but this could paint us into a problematic corner later. Consider that the FreeBSD kernel can execute binaries compiled for the Linux ABI, but there are Linux utilities that interact with Linux-specific kernel interfaces (networking, power-management, VMs). Giving that set of packages with specific interactions with the Linux kernel is a very small subset of packages that can be executed on Linux, I argue that the ABI platform axis is more significant than the kernel platform axis.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I keep kernel, but move it next to the more exotic considerations like NixOS/non-NixOS layout |
||
| * C compiler | ||
| * C library | ||
| * NixOS/non-NixOS global layout, in case of Linux with glibc | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this mean?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some things (OpenGL, for example) where level of support for Nix-on-non-NixOS-Linux is lower than on NixOS. |
||
| * Global linking options | ||
|
zimbatm marked this conversation as resolved.
|
||
|
|
||
| ## Questions to answer for each platform | ||
|
|
||
| * What fraction of packages is expected to work? | ||
|
7c6f434c marked this conversation as resolved.
Outdated
|
||
| * How many users there are / how much testing one can expect? | ||
| * How much complexity is a platform-specific fix allowed to carry? | ||
| * Is there a binary cache for the platform? | ||
| * Is the platform normally tested by the tools like ofBorg? Is it possible to | ||
| get something tested with reasonable effort? | ||
| * Is there expectation that updates do not break things for this platform? | ||
| * How many developers are interested in the platform? How easy it it to get a | ||
| non-trivial fix reviewed? | ||
| * Is Nix supported? | ||
| * Are native bootstrap tools available? | ||
|
|
||
| ## Platforms | ||
|
|
||
| * `x86_64-linux`, native builds with `gcc` and `glibc`. Status: default | ||
| platform, the only truly first-tier platform. All packages not specifically | ||
| defined in terms of OS-specific or CPU-specific tooling for other platforms | ||
| are expected to work if they work anywhere. | ||
|
|
||
| * `aarch64-linux`, native builds with `gcc` and `glibc`. `x86_64-darwin` as a | ||
| name for macOS with `clang` compiler. Status: second-tier platforms. Many | ||
| packages are supposed to work, the main Hydra puts a lot of binary packages | ||
| into the binary cache, there is tooling support to check builds on these | ||
| platforms and some level of effort is expected to be spent on investigating | ||
| new failures after update. | ||
|
|
||
| * `i686-linux`, `armv7l-linux`, `x86_64-linux` with `musl`, static builds. | ||
| Status: cross-compilation targets in different meanings of these words. No | ||
| binary cache available, checking a cross-build via ofBorg is possible but | ||
| complicated, no expectations on upgrade. Fixes not necessary on upper-tier | ||
| platforms are expected to be either localised inside `stdenv` dependencies | ||
| and other compilers/build tools, or to be general cleanups that just happen | ||
| to be optional on upper-tier platforms. | ||
|
|
||
| * Embedded systems like `arm-embedded`, `armhf-embedded` or even `avr`. | ||
| Status: only cross-compilation targets, no tooling support, no expectations | ||
| of attention from non-users. Platform-specific fixes are expected to only | ||
| touch immediate compiler toolchain. | ||
|
|
||
| ## Adding a new platform | ||
|
|
||
| It is expected that embedded-level support (platform definition, basic support | ||
| for the target, maybe a toolchain in the binary cache) can added as long as | ||
| the support code works and is contained in the expected places. If the | ||
| platform users want to set higher expectations, a motivation should be | ||
| provided. User interest, platform perspectives and development effort | ||
| commitment are usually taken into account. | ||
|
|
||
| Before adding an expectation that platform non-users pay attention whether | ||
| upgrades break a lower-tier platform, support for testing on this platform | ||
| must be available. | ||
|
|
||
| # Drawbacks | ||
| [drawbacks]: #drawbacks | ||
|
|
||
| Maintaining the list of platforms (and coordinating agreement on explicit | ||
| support expectations) takes effort, both technical and organisational. | ||
|
|
||
| # Alternatives | ||
| [alternatives]: #alternatives | ||
|
|
||
| Do nothing; make decisions on platform support trade-offs on case-by-case | ||
| basis without a shared framework. | ||
|
|
||
| # Unresolved questions | ||
| [unresolved]: #unresolved-questions | ||
|
|
||
| The list of currently supported platforms is incomplete. | ||
|
|
||
| # Future work | ||
| [future]: #future-work | ||
|
|
||
| Clarify what other considerations there are from the point of view of support | ||
| expectations. | ||
|
|
||
| Describe what expectations usually appear together. | ||
|
|
||
| Support expectations for packages (and package options), NixOS modules, and | ||
| hardware configurations could also be defined. | ||
|
|
||
| Levels of desirability for tricks that are sometimes the only way but are not | ||
| generally encouraged could be defined. (Example: when building an FHS | ||
| environment becomes a reasonable strategy to get something running on a NixOS | ||
| machine?) | ||
Uh oh!
There was an error while loading. Please reload this page.