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

Change windowsHide to false #876

Merged
merged 2 commits into from
Dec 12, 2022
Merged

Change windowsHide to false #876

merged 2 commits into from
Dec 12, 2022

Conversation

matteodepalo
Copy link
Contributor

WHY are these changes introduced?

Fixes #630

On Windows, processes are left hanging around after users terminate dev with Ctrl+C. Digging around I found an issue open on the execa repo that mentioned issues with SIGINT and child processes not getting killed properly on Windows if windowsHide is left to its default value of true.

WHAT is this pull request doing?

This PR changes the value of windowsHide from its default of true to false. This did not seem to have any effect on the behavior of dev

How to test your changes?

  • Run yarn shopify app dev --path fixtures/app on Windows
  • Open the task manager and see all the node processes that the terminal app spawned
  • Press Ctrl+C and see all the node processes disappear.

There will be 1 node process remaining, but this behavior also happens on Mac and there we haven't had any problems with cleaning up child processes. If that single process becomes a problem we can investigate further, but for now this change should make the two platforms behave the same.

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
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

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

github-actions bot commented Dec 7, 2022

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

@@ -68,6 +68,7 @@ const buildExec = (command: string, args: string[], options?: ExecOptions): Exec
stdin: options?.stdin,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd adjust this one to options?.stdin ?? 'inherited'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this, but running dev quits unexpectedly after showing the logs. I suspect there is some issue with the ruby executable being run with this. Perhaps something for another PR?

Copy link
Contributor

@pepicrft pepicrft left a comment

Choose a reason for hiding this comment

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

Tophatted and works as expected. Brilliant finding here @matteodepalo

@matteodepalo matteodepalo marked this pull request as ready for review December 12, 2022 10:02
@github-actions
Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 70.04% 1788/2553
🟡 Branches 62.99% 616/978
🟡 Functions 68.51% 472/689
🟡 Lines 69.99% 1721/2459

Test suite run success

417 tests passing in 238 suites.

Report generated by 🧪jest coverage report action from ca8141b

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]: CLI not killing old processes
2 participants