Skip to content

make atuin compile on non-win/mac/linux platforms#1825

Merged
ellie merged 1 commit into
atuinsh:mainfrom
sunshowers:fix-other-platforms
Mar 5, 2024
Merged

make atuin compile on non-win/mac/linux platforms#1825
ellie merged 1 commit into
atuinsh:mainfrom
sunshowers:fix-other-platforms

Conversation

@sunshowers

@sunshowers sunshowers commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

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 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 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.

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

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

@sunshowers
sunshowers force-pushed the fix-other-platforms branch from bc96ffe to cb03b2c Compare March 5, 2024 03:17
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
sunshowers force-pushed the fix-other-platforms branch from cb03b2c to dd58792 Compare March 5, 2024 03:19

@ellie ellie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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!

@ellie
ellie merged commit 95e9530 into atuinsh:main Mar 5, 2024
@sunshowers

Copy link
Copy Markdown
Contributor Author

I'd love that! Thanks

Done this in #1830.

Seeing as this is your first time contributing, if you would like a holographic contributors-only Atuin sticker, then please fill out this form!

Just filled it out!

I may come hang out on Discord as well, but I mostly lurk there.

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.

2 participants