Skip to content

Add support for FreeBSD #251970

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

Closed
wants to merge 5 commits into from
Closed

Conversation

tagattie
Copy link

This PR contains a set of changes for adding support for FreeBSD.

Basically, FreeBSD can be treated as if it is Linux. So the changes are mainly adding process.platform === 'freebsd', process.platform !== 'freebsd', or case 'freebsd': to wherever it checks the OS is Linux with a few exceptions where the check is for really Linux-specific.

I would much appreciate it if this PR is considered for merging.

Relate PR: microsoft/vscode-deviceid#25
Related Issues: #1359, #30046, #32409, #74857, #129928

tagattie added 4 commits June 20, 2025 15:37
Basically FreeBSD can be treated as if it is Linux. So the changes are just adding process.platform === 'freebsd', process.platform !== 'freebsd', or case 'freebsd': to wherever it checks the OS is Linux with few exceptions where the check is for really Linux-specific.
There are no /proc/version file in the FreeBSD's procfs. So redirect "No such file or directory" message to /dev/null.
FreeBSD is not a glibc-based system.
The format '-o pid=,ppid=,pcpu=,pmem=,command=' is not supported by FreeBSD. So adjust it so that the arguments can be accepted by ps command on both Linux and FreeBSD.
@benz0li
Copy link

benz0li commented Jun 21, 2025

@joaomoreno Please consider this PR. It seems to make @tagattie life easier to maintain the FreeBSD port.

He is the official maintainer of https://www.freshports.org/editors/vscode.

FYI @bpasero

First I thought this change is unnecessary because there is not update service provided for FreeBSD. However, without this change code-oss does not start with error:
Error: [invokeFunction] unknown service 'updateService'
@joaomoreno
Copy link
Member

I'm really sorry, but this isn't something we're committed to doing. All the issues linked above are closed as "not planned" or "out of scope" for a reason. FreeBSD support isn't just what this PR does. It's a long term commitment into maintaining support within the codebase, periodically testing VS Code on that platform, updating and maintaining all our documentation, ideally having someone who selfhosts full time, etc.

Thank you for the changes anyway, they serve as a good base if eventually this becomes a priority for us.

@joaomoreno joaomoreno closed this Jun 26, 2025
@benz0li
Copy link

benz0li commented Jun 29, 2025

@joaomoreno Thank you for the clarification.

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.

3 participants