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

esbuild/deno_esbuild FreeBSD support #2356

Closed
GuillaumeBibaut opened this issue Jun 29, 2022 · 3 comments
Closed

esbuild/deno_esbuild FreeBSD support #2356

GuillaumeBibaut opened this issue Jun 29, 2022 · 3 comments

Comments

@GuillaumeBibaut
Copy link

Hello,
I'm looking into Deno Fresh, and it seems it's using esbuild from https://github.com/esbuild/deno-esbuild. It's looking like a meta package for your esbuild, and although evanw/esbuild supports FreeBSD, the meta package that's used for Deno does not support FreeBSD. Is there any plan to support it?

@GuillaumeBibaut
Copy link
Author

I've tried locally to add freebsd inside the esbuild/deno-esbuild deno 3rd party module, local deno fresh module to use it, and referencing this in the deno fresh sample project, it seems to work on my FreeBSD machine.

I'm not sure if it's the only thing to do, but at least I'm not getting error messages anymore.

@evanw
Copy link
Owner

evanw commented Jun 29, 2022

Is there any plan to support it?

I have no plans regarding Deno because I don't use it myself and I know nothing about it. Any changes related to Deno and esbuild only come about because of other people who care about using those two things together.

The initial Deno library for esbuild that I wrote only supports Windows x64, Linux x64, and macOS x64/ARM64 because those are the only platforms listed as supported on the Deno website. Specifically https://deno.land/#installation only has installation instructions for those platforms and links to https://github.com/denoland/deno/releases which only has binary executables for those platforms. So I assume you're using some from-source build of Deno for FreeBSD, possibly with some custom patches on top?

It seems harmless to add the FreeBSD package to esbuild's Deno library as long as there's a stable value of Deno.build.target for esbuild to use to detect the platform (and as long as it works, but you're saying it does). Keep in mind that I'm not supporting esbuild on FreeBSD myself because I don't have a FreeBSD machine and won't be investigating any issues if something doesn't work. To do this I would need to know the platform string to use here:

esbuild/lib/deno/mod.ts

Lines 148 to 153 in 5d7ac55

const knownUnixlikePackages: Record<string, string> = {
'aarch64-apple-darwin': 'esbuild-darwin-arm64',
'aarch64-unknown-linux-gnu': 'esbuild-linux-arm64',
'x86_64-apple-darwin': 'esbuild-darwin-64',
'x86_64-unknown-linux-gnu': 'esbuild-linux-64',
}

@GuillaumeBibaut
Copy link
Author

Platform string I used are:

'x86_64-unknown-freebsd': 'esbuild-freebsd-64'

@evanw evanw closed this as completed in 3f97a32 Jun 29, 2022
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

No branches or pull requests

2 participants