5 ms·
Is there a better phrasing you could use than "drop-in replacement" for a 1.0 release that has decided to not implement all of "node:"? The let-down from the f
by jedahan 3y ago
Is there a better phrasing you could use than "drop-in replacement" for a 1.0 release that has decided to not implement all of "node:"?
The let-down from the first two projects not being a drop-in replacement is jarring, now I have to be skeptical of all communications coming from bun.
For context, both projects use osc which requires dgram. I was able to find a feature request tracking ticket from 9 months ago with no communicated plans to implement, but searching for 'dgram' in this announcement page doesn't show anything.
For a quick suggestion - can you explicitly state what modules are not supported by bun 1.0 and put that in the section related to node.js compat?
edit: found the docs on node support - https://bun.sh/docs/runtime/nodejs-apis https://bun.sh/docs/runtime/nodejs-apis . Would be nice to link in the release notes.
Cursory glance looks like for modules
- 17 implemented
- 17 partially implemented
- 7 unimplemented
- vasergen 3y agoI think the version is actually closer to `1.0.0-beta` than to `1.0.0`. I just installed v 1.0.0 and run `bun repl` and it failed with exit status code 1, it turns out the repl wants to use port 3000, which was used in my case already. There are probably a lot of other small things like that, look on reported bugs in github. So, I also should be 'skeptical' about all claims they did. Nevertheless I am super impressed with their speed and exited with the result. Didn't expect this project to grow so quickly to this state, I though it will take them much more time. For comparison, deno was started way earlier and now they are miles behind (personal feeling). I am considering to use it for my pet projects
- Jarred 3y agobun repl was a last-minute hack we added. All it does is "bun x bun-repl" which is currently not an official thing. The repl is about to be added and rewritten completely
- MatthiasPortzel 3y agoI’m a little surprised they announced 1.0 already. When I tried bun a little while ago, I noticed many bugs reported on GitHub around reading from standard-in and readline. I attributed it to being a pre-1.0 thing, but those bugs have not been resolved as far as I can tell.
- Jarred 3y agoWhat issues are you running into? We added support for setRawMode in Bun v0.8 (a month ago) and that addressed many issues with stdin and readline.
- whalesalad 3y agoThe port being in use is user error not really fair to put that on bun.
- frutiger 3y agoThe following is probably not relevant for bun. But as an aside: Most programs should bind to port 0 and let the OS allocate a free port and then report the resulting port to any future clients.
- PoignardAzur 3y agoIt is when you're trying to run a REPL. You really shouldn't need exclusive access to a port for that.
- ShadowBanThis01 3y agoHow is Deno "miles behind?" I just started a new project, writing the back end. I'm new to JS and TS, and I don't want to deal with NPM and a morass of modules at all. Deno, Oak, and MariaDB seem like a pretty tidy combo. I have routes and queries up and working with no experience in writing server-side code since PHP 5. What makes Bun better?
- rizky05 3y ago[dead]
- Tomuus 3y ago1.0.0 means the API and semantics are stable, not that there are no bugs.
- graynk 3y agoI second this notion. I was really excited to try it out, only to have it fail to run most of our projects: * can't use AWS SDK v3 because throws an error when parsing a response; * can't use octokit (or anything that depends on jsonwebtoken, for that matter) because node:crypto is not fully implemented; * can’t run our tests, because jest.resetAllMocks() is missing * in another project, bun test failed to even run, complaining about invalid call to shared library So for me the local workflow is “run it with bun, see if it fails, re-run with node if it does”. At least I can always replace npm with it, I guess? Can’t imagine running our services with it just yet. Really excited for the future of the project, because when it works - it really is amazing. But I wouldn’t call it 1.0 if the selling feature is Node compatibility.
- kevlened 3y agoIn the section related to node.js compat, they state: > Note — For a detailed breakdown of Node.js compatibility, check out: bun.sh/nodejs. The detailed breakdown explicitly states which modules are not supported.
- jedahan 3y agoEither I missed this on first read-through, or they just added it. It seems the note mentioning this feels buried for me under a large banner image, instead of near all the other text about compatibility. Anyway, glad it is there, hope that their communications design improves in the future as at least a few others got caught with mismanaged expectations.
- TheFreim 3y agoDrop-in replacement [1] --- [1] Not a drop-in replacement
- IshKebab 3y ago"Drop-in replacement" doesn't imply perfect 1:1 compatibility with no missing features or differences. Otherwise there would be no such thing as a drop-in replacement (in the software world at least).
- TheFreim 3y agoI think the definition on Wikipedia is correct, otherwise a "drop-in" replacement is no different than any other replacement, making it a meaningless term. > [Drop-in replacement] refers to the ability to replace one hardware or software component with another one without any other code or configuration changes being required and resulting in no negative impacts. https://en.wikipedia.org/wiki/Drop-in_replacement https://en.wikipedia.org/wiki/Drop-in_replacement
- jstummbillig 3y agoI don't see a conflict by that definition. The drop in could easily or partially be interpreted from the perspective of the receiver and does not have to be a static property of the replacement.
- ARandomerDude 3y ago> Cursory glance looks like for modules - 17 implemented - 17 partially implemented - 7 unimplemented The question isn't just how many? but also which ones?. Anecdotally, I've been test driving bun for a large application with millions of existing customers. So far, the only issue I've had isn't with bun per se, it's with patch-package not yet supporting the lock file (bun.lockb). Bun is without question faster than yarn by a wide margin. And I say this as someone who really loves yarn.
- jedahan 3y agoAll good questions - and every person has different needs. The fact is each potential adopter either needs to go through and comb over the compatibility page (not what I would expect with a drop-in replacement); or just try and see if it works, and be surprised later if they run into an unimplemented module because they were operating under an incorrect assumption.