Skip to content Skip to footer
0 items - $0.00 0

A steam locomotive from 1993 broke my yarn test by jgrahamc

A steam locomotive from 1993 broke my yarn test by jgrahamc

A steam locomotive from 1993 broke my yarn test by jgrahamc

7 Comments

  • Post Author
    pjc50
    Posted April 2, 2025 at 1:28 pm

    Plus points for using strace. It's one of those debugging tools everyone know about for emergencies that can't be solved at a higher level, and a great convenience of using Linux. The Windows ETW system is much harder to use, and I'm not sure if it's even possible at all under OSX security.

  • Post Author
    GTP
    Posted April 2, 2025 at 1:53 pm

    Just from the title, I suspected that Steam Locomotive had something to do with it. So I quickly glanced through the article up to the point where the locomotive shows up. Sometimes there's the idea hanging in my mind to make a version called Slow Locomotive, where the train slows down every time you press ctrl-c.

  • Post Author
    bouke
    Posted April 2, 2025 at 2:35 pm

    So the real problem is that Jest just executes to whatever `sl` resolves. The fix they intent to release doesn't address that, but it tries to recognise the train steaming through. How is this acceptable behaviour from a test runner, as it looks like a disaster to happen. What if I have `alias sl=rm -rf /`, as one typically wants to have such a command close at hand?

  • Post Author
    fifticon
    Posted April 2, 2025 at 2:42 pm

    as a 30+y employed systems programmer, when I read a story like this, I get angry at the highly piled brittle system,not at the guy having sl installed. I am aware there exists a third option of not getting angry in the first place, but I hate opaque nonrobust crap. This smells like everything I hate about front-end tooling. ignorance and arrogance in perfect balance.

  • Post Author
    snovymgodym
    Posted April 2, 2025 at 3:10 pm

    The real story here is that the author and his coworker wasted a bunch of time tracking down this bug because their dev environment was badly set up.

    > his system (MacOS) is not affected at all versus mine (Linux)

    > nvm use v20 didn't fix it

    If you are writing something like NodeJS, 99% of the time it will only ever be deployed server-side on Linux, most likely in a container.

    As such, your dev environment should include a dev dockerfile and all of your work should be done from that container. This also has the added benefit of marginally sandboxing the thousands of mystery-meat NPM packages that you will no doubt be downloading from the rest of your machine.

    There is zero reason to even mess with a "works on my machine" or a "try a different node version" situation on this kind of NodeJS project. Figure out your dependencies, codify them in your container definition, and move on. Oh, your tests work on MacOS? Great, it could not matter less because you're not deploying there.

    Honestly, kind of shocking that a company like Cloudflare wouldn't have more standard development practices in place.

  • Post Author
    Kwpolska
    Posted April 2, 2025 at 3:12 pm

    Naming your source control tool after a common mistyping of ls is such a Facebook move.

  • Post Author
    mzs
    Posted April 2, 2025 at 3:13 pm

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.