-
Notifications
You must be signed in to change notification settings - Fork 312
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
handle unwrap while getting current kernel version #1042
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
I won't speak for @alessandrod but IMO logging errors is not what we want to do here. We should instead propagate those errors, probably. |
IMO it's not worth polluting the API for a condition that should effectively never happen. At some point, we'll fix our errors so that they don't have 2000 variants and users can do exhaustive matches. Doing an exhaustive match on "the kernel version can't be detected" is unnecessary cognitive overhead. We should always be able to detect the kernel version and we are. There are some obscure edge cases with distros very few people use (proxmox) and in that case I think it's sufficient to warn and execute the most conservative code. Warnings are shown by default, so they're unlikely to go undetected. |
Any review guys 🙏 |
This has merge conflicts. |
@pythops, this pull request is now in conflict and requires a rebase. |
There remains a single instance of `KernelVersion::current().unwrap()` in the program loading path; this one is likely to be noticed immediately so it is left undisturbed. Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
There remains a single instance of `KernelVersion::current().unwrap()` in the program loading path; this one is likely to be noticed immediately so it is left undisturbed. Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
There remains a single instance of `KernelVersion::current().unwrap()` in the program loading path; this one is likely to be noticed immediately so it is left undisturbed. Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
Cache the current kernel version in a thread-local while I'm here. Closes aya-rs#1024. Closes aya-rs#1042.
Closes #1024
There is still 2 places where we still
unwrap
though. To handle it there might require changes to some functions that I am not sure if they should be part of this PRThis change is