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.…
From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
41–50 of 109 posts
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#42https://github.com/ericbeland/ruby-packer
Also, there was an issue with the most recent X-Code, so I had to actually downgrade my local X-Code to compile rubyc.
I wonder if Shopify had known they could build the ruby CLI into stand-alone binaries (no Ruby install or Node needed) if they would have still gone the Node route? Not that I blame them for not knowing--I had to fork the motor-admin fork, and update a few things to get it working. The original ruby-packer only works with ancient Rubies.
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#43Cool. 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…
It might not even be a top thing, if they migrated internal eng from Ruby to node internally I would not be surprised if this was dev-driven either
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#44I 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.…
1. dependencies for Gems are specified in the gemspec file and not the Gemfile. See https://github.com/Shopify/shopify-cli/blob/main/shopify-cli... for example. There's a few non-development dependencies.
2. since it's difficult to package up a Ruby gem for distribution, maybe dependencies were vendored directly in the codebase: https://github.com/Shopify/shopify-cli/tree/main/vendor
This isn't meant to be a comparison of the number of dependencies or anything. Just pointing out a few nuances to how the Ruby dependencies were handled.
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#45I 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.
Not at Shopify there ain't.
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#46PSA: 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?
The dependency injection pattern fits better. DI is basically passing around objects which conform to an interface. This way you can mock out those objects more easily.
Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#47Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#48Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#49Re: From Ruby to Node: Overhauling Shopify’s CLI for a better developer experience
#50Questionable decision making. Why not use Go when minimizing runtime dependencies is first priority? I’d probably just have cleaned up the Ruby code and used something like Ruby-Packer to create binaries. When typing is so important why not use rbs? Makes no sense to me.