Skip to content
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

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Conversation

CalebHeydon
Copy link
Contributor

@CalebHeydon CalebHeydon commented Nov 10, 2024

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.

image

Needs to be build with RUSTFLAGS="-C link-dead-code"

Known Issues:

  • There's an issue in crates/project/src/environment.rs where a command fails because /bin/sh on FreeBSD doesn't support the -l option.
    image
  • The file/folder choosers provided by the ashpd crate don't work on FreeBSD (at least with KDE). This isn't that bad since a fallback dialog is used.
    image
  • Moving to trash won't work.
  • Numerous tests fail (when running on FreeBSD). While I haven't looked into this much, it appears that the corresponding features seem to work fine.

Release Notes:

  • Added initial support for FreeBSD

Copy link

cla-bot bot commented Nov 10, 2024

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

@CalebHeydon
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 10, 2024
Copy link

cla-bot bot commented Nov 10, 2024

The cla-bot has been summoned, and re-checked this pull request!

@zed-industries-bot
Copy link

zed-industries-bot commented Nov 10, 2024

Messages
📖

This PR includes links to the following GitHub Issues: #15309
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against b9b8dae

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a 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");
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@SomeoneToIgnore SomeoneToIgnore self-assigned this Nov 11, 2024
@SomeoneToIgnore SomeoneToIgnore merged commit a47759f into zed-industries:main Nov 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants