Live data from Hacker News

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

shopify.engineering

21–30 of 109 posts

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

#21

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.

What's the mechanism for self-updating in place? Something more intelligent than just downloading and copying the file over itself? A running program itself is a copy of the file on disk, I think. So that sounds fine. But this still depends on getting permissions right though I think. Also, does a binary always know where it lives (across Win/Mac/Linux)?

Download-and-copy is the way. A single binary CLI can just copy over itself and exec into the new version. You can preserve the permissions of the original file.

With scripting-language CLIs, you either have to deal with the module install process or use an external packaging solution.

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

#22

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.

Exactly, I get that they initially used Ruby given the whole company is build on it. But overhauling the CLI and NOT going for a single binary is beyond me.

Seems odd on the face of it. They say it is because the CLI already depended on Node and they couldn't escape it. So, they moved from depending on Ruby and Node to just Node I guess.

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

#23

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…

A lot of Shopify Partners I've talked to feel the same way. The tooling and API has become harder to work with over the past couple of years.

The previous designs (which worked very well for a long time) seemed to have been all thrown out/deprecated to such a large degree it has caused a lot of long time devs to be scratching their heads.

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

#24

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…

[deleted]

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

#25

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?

You don't even need that: https://github.com/vercel/pkg.

I think there are equivalents in the Python ecosystem.

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

#26
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.com/Shopify/shopify-cli/blob/main/Gemfile

What am i missing? Why do you have to rely on all that junk to run a CLI? It feels like people choose Node because creating a Rube Goldberg machine creates job security.

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

#27

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…

They sure do like to start over, huh? What's funny is that Slate was canned while still in beta: https://github.com/Shopify/slate#-slate---end-of-support-jan...

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

#28

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.…

[deleted]

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

#29

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…

One of the things I find fascinating is that in the days where it was Liquid templates, and Vercel etc. were barely a twinkle in people's eyes, Shopify had a huge value add - that you or an app development consultancy could iterate on customizing interfaces here and there, and deploy changes from the CLI or directly on the Shopify platform, without needing to worry about deployment, payment processing, etc.

But so much has changed now. Deploying a customized frontend has a negligible cost, and the API surface that Shopify powers could be powered by a myriad of tools, with Stripe etc. doing large amounts of heavy lifting on the administrative side.

Were contractual obligations, and not wanting to bite the hand that feeds, the only thing preventing longstanding Shopify app developers from joining together and creating an industry-standard alternative API surface that could be deployed in different ways?

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

#30

PSA: The singleton context configuration is probably the most disgusting thing I've seen in Ruby culture. Please do not bring this practice to node -- I've already witnessed this crime in shopify SDKs and stripe.

Honest question: Why is it a bad pattern? And what are some better alternatives from other ecosystems?
Post reply on HN