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

handle nil in config options (broken in 1.2.2) #217

Merged

Conversation

flavorjones
Copy link
Contributor

Context

In rake-compiler 1.2.1 and earlier, if an extension did something like this, rake-compiler handled it gracefully:

  Rake::ExtensionTask.new("gem", spec) do |ext|
    ext.config_options << ENV["EXTOPTS"] # this is probably going to be nil
  end

It is OK to do this because in 1.2.1 and earlier, the command array was executed as:

  sh cmd.join(' ')

However, this was changed in 1.2.2 to

  sh *cmd

which of course is preferable. However, this breaks extensions like nokogiri that do something silly like above.

Details

I've fixed Nokogiri (see sparklemotion/nokogiri#2894) but I do think that there may be other gems impacted by this change.

This PR does a few things:

This is a big PR because of the extraction and test coverage. Please let me know if you would prefer this to be done a different way.

@flavorjones flavorjones changed the title handle nil in config options handle nil in config options (broken in 1.2.2) May 29, 2023
lib/rake/extensiontask.rb Outdated Show resolved Hide resolved
lib/rake/extensiontask.rb Outdated Show resolved Hide resolved
@flavorjones flavorjones force-pushed the flavorjones-handle-nil-in-config-options branch from 2c6c436 to 63d1aad Compare May 30, 2023 02:31
@kou kou merged commit 297cd16 into rake-compiler:master May 30, 2023
12 checks passed
@kou
Copy link
Member

kou commented May 30, 2023

Thanks!

@flavorjones flavorjones deleted the flavorjones-handle-nil-in-config-options branch May 30, 2023 13:15
konsolebox added a commit to konsolebox/digest-kangarootwelve-ruby that referenced this pull request Jun 24, 2023
konsolebox added a commit to konsolebox/digest-xxhash-ruby that referenced this pull request Jul 21, 2023
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.

None yet

2 participants