This isn't just a theoretical solution either, it's already implemented in LLVM: https://clang.llvm.org/docs/UsersManual.html#cmdoption-gline...
Bun’s New Crash Reporter
21–30 of 91 posts
Re: Bun’s New Crash Reporter
#22 user@host:~/d/temp/server$ bun run index_fastify.js
14 | warned.add(feature), console.warn(new NotImplementedError(feature, issue));
15 | }, $;
16 |
17 | class NotImplementedError extends Error {
18 | code;
19 | constructor(feature, issue) {
^
NotImplementedError: node:http2 createServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887
code: "ERR_NOT_IMPLEMENTED"
at new NotImplementedError (internal:shared:19:27)
at internal:shared:2:69
at node:http2:48:53
at getServerInstance (/Users/user/d/temp/server/node_modules/fastify/lib/server.js:342:16)
at createServer (/Users/user/d/temp/server/node_modules/fastify/lib/server.js:25:18)
at fastify (/Users/user/d/temp/server/node_modules/fastify/fastify.js:198:30)
at /Users/user/d/temp/server/index_fastify.js:4:13
The linked issue is actually about implementing support for http/2 clients, which was already released in v1.0.13 (https://bun.sh/blog/bun-v1.0.13#http2-client-support). The NotImplementedError message should be updated to point to the issue for the server variant: https://github.com/oven-sh/bun/issues/8823Implementing http/2 server support is in the top few feature requests (https://github.com/oven-sh/bun/issues?q=is%3Aissue+is%3Aopen...). It looks like once they ship this, a lot more people will be able to move over to Bun.
Re: Bun’s New Crash Reporter
#23Did you know that bun needs to download 37 packages before the repl becomes available? No internet no repl for you. PS C:\Users\anon> bun repl bun-repl [6/6] error: FailedToOpenSocket downloading package manifest bun-repl error: bun-repl@latest failed to resolve Not a big deal, but I was expecting (and frankly excited) to have a single no-install executable to drop in my PATH and have it just work!
Re: Bun’s New Crash Reporter
#24Re: Bun’s New Crash Reporter
#25So the argument for using this over a regular stack trace is that they don't have to ship megabytes of debug symbols. However they have seemingly just ignored the better option of only including function names in the debug table, which is obviously a much nicer option than having to use a web service to view you stack trace. This isn't just a theoretical solution either, it's already implemented in LLVM: https://clan…
Re: Bun’s New Crash Reporter
#26Earlier quoted context omitted.
Bun + uwebsocket cut my server costs and requirements significantly for my websocket app. It's a real delight to work with.
How did it cut your server costs - increased performance and therefore reduced load? Bun looks quite promising, but I've heard mixed feedback on it being a "drop in" replacement of node. Any experience with that aspect?
Re: Bun’s New Crash Reporter
#27So the argument for using this over a regular stack trace is that they don't have to ship megabytes of debug symbols. However they have seemingly just ignored the better option of only including function names in the debug table, which is obviously a much nicer option than having to use a web service to view you stack trace. This isn't just a theoretical solution either, it's already implemented in LLVM: https://clan…
Re: Bun’s New Crash Reporter
#28A lot of people trash about bun, but I think that they are highly motivated people bringing a lot to the table.
Re: Bun’s New Crash Reporter
#29So, anybody using Bun? Does it live up to hype?
It’s good unless you want a repl (they pretend to have one but it’s miserable: >6s latency all the time when it updates), or you plan to use any native modules. The error messages are also significantly worse than node’s. I used it for a bit, but node with ‘—loader tsx’ does everything I want nowadays with none of the downside. If I was building a simple server, perhaps with websockets, and I was sure it need native…
It's efficient, as you can test and narrow things down in isolation and figure out what is working or not-working very quickly. It's also a good way to try a new module, and this is reflected in docs that eg, use node's REPL as a demo.
One bizarre problem with bun's REPL at the moment, which can be quite the unexpected "gotcha", is the REPL itself seems to be cached, and it goes stale. It actually expects to be able to update itself online every day or so, or it breaks!
Yeah, well cool - unless you ever work offline. Eg, had you expected to work on a long flight and now half your dev workflow was broken, for no good reason. (And unfortunately bun's "--prefer-offline" flag had no effect.)
I don't want to criticise bun too much - it is incredibly fast, and has made other significant workflow enhancements.
But a REPL is a dealbreaker for some of us. I guess it's similar to hot code-reloading in compiled languages, you don't go back to the minutes-long compile-wait cycle for the kinds of problems that kind of workflow makes instantaneous.
Re: Bun’s New Crash Reporter
#30Microsoft is really good at this BTW. At SQL Server we had mini dumps they were tiny stripped out of personal info and incredibly useful. And a full dump of a production SQL Server even at that time (15 years ago) would be a huge file - too big to move around.