make atuin compile on non-win/mac/linux platforms#1825
Merged
Conversation
sunshowers
force-pushed
the
fix-other-platforms
branch
from
March 5, 2024 03:17
bc96ffe to
cb03b2c
Compare
Hi! I've been trying to get atuin set up on the illumos machine I built for work @oxidecomputer, and I ran into a few issues which are fixed here: 1. The `clipboard` feature was only supported on Windows, Mac and Linux. I've added a platform gate for that. 2. The `atomic-write-file` crate needed an update to the version of `nix` -- that is included. 3. As part of this, I found a [security bug](https://rustsec.org/advisories/RUSTSEC-2024-0020.html) in the whoami crate. The bug has been fixed upstream and I've included it. whoami 1.5.0 deprecates the `hostname` function, which produced some fresh warnings. While fixing the warnings I also took the liberty of doing some code rearrangement, adding a few functions that wrap some common operations. I didn't really know where to put those functions, so I created a new `utils` module for it. If you have a better place to put them, I'm happy to change the PR. Feel free to make any changes to this PR if you like before landing it, or to ask for review. As a followup I'm also happy to set up a cross-compile build for atuin on illumos. It's a bit harder to run tests in CI for illumos at the moment, but I'm trying to get a project started up to make that happen in the future as well.
sunshowers
force-pushed
the
fix-other-platforms
branch
from
March 5, 2024 03:19
cb03b2c to
dd58792
Compare
ellie
approved these changes
Mar 5, 2024
ellie
left a comment
Member
There was a problem hiding this comment.
Thank you so much! Very happy that the changes needed to run on illumos are so minimal 🥳
As a followup I'm also happy to set up a cross-compile build for atuin on illumos. It's a bit harder to run tests in CI for illumos at the moment, but I'm trying to get a project started up to make that happen in the future as well.
I'd love that! Thanks
Seeing as this is your first time contributing, if you would like a holographic contributors-only Atuin sticker, then please fill out this form!
We do also have a Discord if you'd like to ask any questions, or just fancy hanging out!
2 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
I've been trying to get atuin set up on the illumos machine I built for work @oxidecomputer, and I ran into a few issues which are fixed here:
The
clipboardfeature was only supported on Windows, Mac and Linux. I've added a platform gate for that.The
atomic-write-filecrate needed an update to the version ofnix-- that is included.As part of this, I found a security bug in the whoami crate. The bug has been fixed upstream and I've included it (it's required to prevent a crash that happens on illumos).
whoami 1.5.0 deprecates the
hostnamefunction, which produced some fresh warnings. While fixing the warnings I also took the liberty of doing some code rearrangement, adding a few functions that wrap some common operations. I didn't really know where to put those functions, so I created a newutilsmodule for it. If you have a better place to put them, I'm happy to change the PR.With these issues fixed, I'm happy to say that atuin works fantastically on illumos with zsh!
Feel free to make any changes to this PR if you like before landing it, or to ask for review.
As a followup I'm also happy to set up a cross-compile build for atuin on illumos. It's a bit harder to run tests in CI for illumos at the moment, but I'm trying to get a project started up to make that happen in the future as well.
Checks