-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Kernel name #1417
Comments
Sounds good to me and it also seems like you know what you want so feel free to send a PR. If you don't have a system for the implementation, I'll implement that so no need to worry about it. |
As I looked into this more, one complication is what to return on Windows. On Windows the The |
So to sum it up, |
Context: I am working on porting a project off of
sys-info
because it is unmaintained and does not work on Android. I am considering usingsysinfo
.The
sys-info
crate provides a pair of functionsos_type()
andos_release()
. The pair of values from these functions (for example "Linux" "6.8.0-48-generic", or "Darwin" "24.1.0") is a useful aggregation for identifying kernel-specific bugs. They are used for this purpose by https://crates.io/crates/bugreport.As seen in #1416,
sysinfo
's existing suite of system name/version methods (name()
,kernel_version()
,os_version()
,long_os_version()
,distribution_id()
) is not conducive to aggregating bugs by kernel version.If we aggregate by only
kernel_version()
, then bugs from 2 completely unrelated kernels with the same version could end up bucketed together. Maybe this doesn't happen right away because contemporary Linux versions start with a single-digit integer and contemporary Darwin versions start with a double-digit integer and Windows does its own thing, but are we sure about other systems? How many years before the Linux version range overlaps the Darwin version range supported by Rust?If we aggregate by
kernel_version()
+ any of the other four functions, the bucketing is too fine because bugs from the same kernel end up in different buckets. For example 2 different Android device models using the same kernel, or 2 different Linux distributions using the same Linux version.If we aggregate by anything not involving
kernel_version()
, none of the other options identify the kernel version.It would be useful to have a
kernel_name()
where the tuple ofkernel_name()
+kernel_version()
identifies a particular release of one kernel.For this use case, it would be acceptable to prioritize names that are meaningful to technical humans over technical accuracy, for example when it comes to "Darwin" vs "XNU", or "Windows" vs "NT".
The text was updated successfully, but these errors were encountered: