sorry, not yet 🙇‍♂️ we had a small thread here h...
# 💻|contributing
a
sorry, not yet 🙇‍♂️ we had a small thread here https://discord.com/channels/817392104711651328/1103003569654865941/1103003569654865941 and i created a tracking issue here https://github.com/garden-io/garden/issues/4158 it has already got quite a few reactions - people do want it 😅
a
Turns out Node 20 is not at all supported by pkg, and I hesitate to guess when that will happen. We might consider this instead then: https://github.com/leafac/caxa Some pros and cons, but worth an experiment imo. I'd be curious to see performance impact, startup time etc. The latter could be affected substantially by switching to Yarn PnP (which does not jive with pkg), or outright bundling the whole thing, because it drastically reduces I/O on startup. Thinking ahead, the general direction of making a Go CLI frontend for
garden serve
operating as a daemon (exempting interactive commands like
garden dev
, where startup time is less of a concern to begin with), will mean we care less about startup time, but we do have to think about it in the meantime. But if migrating to caxa results in a proportionally small startup time delta (ignoring the very first startup which we could address at install time), it may well be worth it given the substantially simpler architecture. By all means hold until post 0.13 launch, but I'd really like to probe this after.
It would appear single-executable development from Node 20 onwards is being pushed into Node.js itself: https://nodejs.org/dist/latest-v20.x/docs/api/single-executable-applications.html Still experimental though, so I wouldn't expect this to work well for us until Node 22 at least. Although to be fair, the pkg tool has never felt like the most stable thing.
Going by the docs, we'd almost certainly need to bundle the whole application for this to work, and would probably have to track down a bunch of small issues just relating to that.
a
made a small attempt today at node 20 to see what kind of effort would be required. on the plus side, looks like there aren't that many breaking changes in 19 and 20 on the minus side, as was mentioned above, we're blocked on this until
pkg
and
pkg-fetch
add
node20
support for the
build-dist
step various other tests seemed to pass though! https://github.com/garden-io/garden/pull/4346
a
Yeah, I suspect we'll need to later investigate alternatives to pkg, but that's a non-trivial project.
a