Live data from Hacker News

From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

shopify.engineering

51–60 of 109 posts

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#51

Earlier quoted context omitted.

Huh? To run a node application, you need node installed on the container, as well as the JS files. Is that a big deal?

You don't even need that: https://github.com/vercel/pkg . I think there are equivalents in the Python ecosystem.

I have used PyInstaller for this before, which has the major caveat of it not being a cross-platform solution. You can only build binaries for the platform you're currently on. However, you can work around this by configuring GitHub Actions to build binaries for you for Windows, macOS (x86) and Linux.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#52

I'm begging you, just use a language that compiles to a single binary. It can self update in place, be easily installed on developer machines and CI pipelines without requiring a whole additional toolchain in every container. Google, Heroku, AWS, Shopify all do and it's an awful developer experience.

Huh? To run a node application, you need node installed on the container, as well as the JS files. Is that a big deal?

Yes, because now I need to install node, probably run npm install, etc…

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#53
Nice. But there is so much more work to be done. From a customer perspective, it's great. However, really feel as the entire developer experience is in need of an overhaul (And it seems pretty clear that they know that too). In saying that, even if things don't change, it's still the best option for a lot of merchants.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#54

I just find working with Node to be gross. Look at this: https://github.com/Shopify/cli/blob/main/package.json but wait...this too: https://github.com/Shopify/cli/blob/main/packages/app/packag... https://github.com/Shopify/cli/blob/main/packages/cli-hydrog... https://github.com/Shopify/cli/blob/main/packages/cli/packag... https://github.com/Shopify/cli/blob/main/packages/create-app... etc, etc, etc VS https://github.…

One reason is because ruby has a large standard library. Also people just pick what they know - there are more js devs than ruby devs. Also neither ruby nor node are a good choice for a cli, so it is kind of a moo point.

It's like a cow's opinion.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#56

Cool. But god, the Shopify CLI / developer experience has degraded so much in the past few years. With the newest iteration, they want a full app re-structure just to work with the CLI properly. It is absolutely brutal. Sure, before they had basically no tooling, but then they had some basic ones that everyone was basically happy with, and then they just decided to iterate too much. (saying this as a ~ 8 year long Pa…

My read on this is they just wanted to cut out Ruby and do everything in Node. That's fine as a decision, but rest of the article feels like just trying to justify it after the fact. Like someone at the top decided, now lets pretend it's a good decision. As you mentioned, if they're not OK with CLI, they could refactor in Ruby. The whole "embracing functional programming" and MVC architecture (i think Rails when i he…

That’s how I read the article too. We wanted to move from ruby to node. They even admit that the most well know language is ruby in their org. Seems like a pretty serious waste of resources to me.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#58
It increasingly feels like the decisions taken and the work done at Shopify API / Libraries / CLIs / Docs etc are done for promos, rather than thinking about DevEx of people who try to build reliable product on their platform.

I notice this pattern of shoving nodejs / js, especially react through people's throat for the apps developed on the platform. Polaris, Session tokens and all the boilerplate apps the CLI generates are great examples of that.

I would rather having Polaris as CSS framework + some JS bits in vanilla-JS, Auth + Session tokens as just as a small JS library. But instead I am forced to use React. I know Polaris is also available as CSS only but that's almost impossible to use as it's not designed for human use really. Or Bridge exists as a library but for many cases it's just way too bloated and documentation for non-react version of those things are not so good.

Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience

#59

Earlier quoted context omitted.

Huh? To run a node application, you need node installed on the container, as well as the JS files. Is that a big deal?

Yes, because now I need to install node, probably run npm install, etc…

there's no npm install and there's no etc.

All the files needed to run a node application are in node_modules. If node is on the container, you can just rsync the scripts.

I think you're comparing distributing stand alone binaries, vs distributing the source code for a node app, and then installing its dependencies, and maybe doing some transpiling. That's not a fair comparison.

Post reply on HN