Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'wdm' to bundled CLI 2.x Gemfile #814

Merged
merged 3 commits into from Dec 8, 2022
Merged

Add 'wdm' to bundled CLI 2.x Gemfile #814

merged 3 commits into from Dec 8, 2022

Conversation

Poitrin
Copy link
Contributor

@Poitrin Poitrin commented Nov 24, 2022

WHY are these changes introduced?

Fixes #780

WHAT is this pull request doing?

shopify-cli is using the gem listen, which calls require 'wdm', without having it mentioned in its Gemfile (→ guard/listen#553).

To solve this, we install wdm via the bundled CLI's Gemfile.

How to test your changes?

Windows

  1. Open your Windows environment
  2. Clone cli repo and cd into it
  3. yarn install and yarn build
  4. cd into a valid theme directory
  5. Make sure that gem which wdm returns Can't find Ruby library file or shared library wdm
  6. run node ../cli/packages/cli-main/bin/dev.js theme dev
  7. (potentially log in into your store)
  8. No error regarding wdm should appear anymore
  9. Open C:\Users\<YOUR USER NAME>\AppData\Local\shopify-cli-nodejs\Cache\vendor\ruby-cli\<2.x.x>\Gemfile and make sure that gem 'wdm' is mentioned there

macOS

  1. Repeat the same steps on macOS
  2. Open /Users/<YOUR USER NAME>/Library/Caches/shopify-cli-nodejs/vendor/ruby-cli/<2.x.x>/Gemfile and make sure that gem 'wdm' is not mentioned there

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@github-actions
Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/theme-developer-tools
  • UI extensions: @shopify/ui-extensions-cli
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@Poitrin Poitrin marked this pull request as ready for review November 24, 2022 15:02
@Poitrin Poitrin requested review from a team, Arkham and alvaro-shopify and removed request for a team November 24, 2022 15:21
@karreiro karreiro requested review from karreiro and removed request for a team November 25, 2022 08:34
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Poitrin! Great stuff 🚀 I've left only one minor comment/question :)

packages/cli-kit/src/public/node/ruby.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Poitrin! LGTM and works fine as well 🎩

Copy link
Contributor

@Arkham Arkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Arkham Arkham merged commit 8b7663a into main Dec 8, 2022
@Arkham Arkham deleted the fix-780 branch December 8, 2022 16:41
@AaronGabriel147
Copy link

This update looks nice but I am slightly confised about 3 of the steps on Windows that are listed. What exactly do these steps mean?

  1. Make sure that gem which wdm returns Can't find Ruby library file or shared library wdm
  2. run node ../cli/packages/cli-main/bin/dev.js theme dev
  3. (potentially log in into your store)

@Arkham
Copy link
Contributor

Arkham commented Dec 8, 2022

@AaronGabriel147 they are to test that this change is working correctly using the development version of the code. As a user you don't need to worry about them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Shopify CLI error - Themes and wdm
4 participants