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

Never spawn subshells when building extensions #4190

Merged

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

In #4189 I was expecting CI to pass, however it failed because apparently on Windows, Open3.capture2e does not seem to start a new shell even when given a string argument, and that made my changes break some tests.

I think not spawning a new shell should be our default behaviour.

What is your fix for the problem, implemented in this PR?

My fix is to change our Open3.capture2e calls to always receive an array, so that it always try to run the command directly instead of starting a new shell.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez force-pushed the never_spawn_new_shells_when_building_extensions branch 2 times, most recently from 6cb369c to 7778758 Compare December 23, 2020 17:31
@deivid-rodriguez deivid-rodriguez force-pushed the never_spawn_new_shells_when_building_extensions branch from 7778758 to d183030 Compare December 23, 2020 17:36
@deivid-rodriguez deivid-rodriguez force-pushed the never_spawn_new_shells_when_building_extensions branch from d183030 to a5b5371 Compare December 23, 2020 20:40
deivid-rodriguez and others added 3 commits December 24, 2020 17:02
These commands are already escaped. Calling `inspect` here adds a second
level of escaping, making the errors super confusing. Also, when dealing
with multiline output, I find it nice to add some clear delimiters of
where the output begins and ends.
As a result, we no longer need to manually quote `DESTDIR`, and all
commands printed as part of error messages are now properly escaped so
they can be copy-pasted directly into the shell.

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
@deivid-rodriguez deivid-rodriguez force-pushed the never_spawn_new_shells_when_building_extensions branch from a5b5371 to ad632bb Compare December 24, 2020 16:07
@deivid-rodriguez deivid-rodriguez merged commit 57fb2d1 into master Dec 28, 2020
@deivid-rodriguez deivid-rodriguez deleted the never_spawn_new_shells_when_building_extensions branch December 28, 2020 09:21
deivid-rodriguez added a commit that referenced this pull request Dec 29, 2020
…ilding_extensions

Never spawn subshells when building extensions

(cherry picked from commit 57fb2d1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants