-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add initial FreeBSD support #20480
Add initial FreeBSD support #20480
Conversation
We require contributors to sign our Contributor License Agreement, and we don't have @CalebHeydon on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
@@ -33,11 +33,16 @@ impl KeyContext { | |||
let mut context = Self::default(); | |||
#[cfg(target_os = "macos")] | |||
context.set("os", "macos"); | |||
#[cfg(target_os = "linux")] | |||
#[cfg(any(target_os = "linux", target_os = "freebsd"))] | |||
context.set("os", "linux"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and another place below with Self::Linux
looks quite odd, so welcome to fix in in the future PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out. It probably is correct to set the context to linux, but I'll need to prevent it from setting it to unknown.
This PR adds initial support for FreeBSD (#15309). While there is still work left to be done, it seems to be usable. As discussed by @syobocat (#10247), the changes were just adding
target_os = "freebsd"
to wherever it checks if the OS is Linux.Needs to be build with
RUSTFLAGS="-C link-dead-code"
Known Issues:
crates/project/src/environment.rs
where a command fails because/bin/sh
on FreeBSD doesn't support the-l
option.ashpd
crate don't work on FreeBSD (at least with KDE). This isn't that bad since a fallback dialog is used.Release Notes: