My Authors
Read all threads
Currently at 11 months since switching to TypeScript, probably 20 hours spent just trying to get a reliable build watcher (with easily 20,000 hours of Unix experience). I've never even gotten close. I'll go to my grave screaming that long-running stateful build tools never work.
I just rewrote all of it for the nth time, but this time is fundamentally different. All of the dev processes are managed by a single 175-line script that starts, stops, and restarts them at the right times. The process that it runs never spawn children. Any leaks are my fault.
This is what I should've done when I first had these problems. Trust as few external tools as possible; make it all my problem. That way, when something goes wrong, I know who to blame, and I know that it's fixable.
have I mentioned that I wrote my own test runner
This job management script already existed, but it was simpler because it was just forked off by the TypeScript compiler whenever the build succeeded. One of the nice side effects has always been easily-read breakdown of which output comes from where.
I also put in a few minutes of work to get nicely printed emails in our dev console output. There are a few other similar niceties as well. You can also see it handling interleaved output here. I get very annoyed when everything is mixed together without clear separations.
anyway I'm sure that now everything will be perfect for ever
welcome to the a n s i z o n e
A nice side effects of using either of the two One True Editors is that entering very weird characters is pretty much painless. Those escape characters are <c-v><esc>. I can trust that they'll be rendered properly and I'll be able to navigate over them properly. It's fine.
For contrast: VSCode simply doesn't render them. Silently. It's like they don't exist. There's a character there; how could you just silently not render it? Not even a Unicode "unknown character" box?! This is really basic stuff!
carriage return line feed joke
I don't do this kind of wheel-reinvention in other languages. In Ruby and Python I never used my own test runner, there was no build step to worry about, etc. But in JS, everything is so complicated! The lower-level pieces tend to be more tractable at least (e.g. chokidar).
Ten days later: just hit my second-ever bug in the TypeScript compiler. Again, it's a bug that can only exist in watch mode. Watchers do not work watchers do not work watchers do not work watchers do not work watchers do not work watchers do not work watchers do not work watchers
(The compiler did this. Killing the compiler and restarting it made that error go away. If killing and restarting any watcher process makes the error message change or go away, then it's a bug, full stop.)
On the bright side: the process watcher/restarter that I wrote in the middle of this thread hasn't failed yet. It seems like the TypeScript compiler might be the weak link now. If so, that's pretty good; tsc is significantly better than average!
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Gary Bernhardt

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!