Skip to content
New issue

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

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

Already on GitHub? # to your account

subprocess: Fix the argument delegation with Ruby 3.0 #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

legal90
Copy link
Contributor

@legal90 legal90 commented Mar 22, 2023

This PR fixes the following error which currently happens on Ruby 3.0:

provider/parallels/disk/basic
  it should behave like provider/disk/basic
    configures storage mediums
      Execute: vagrant box add box /Users/legal/Workspace/vagrant-parallels/boxes/centos-7.8.box
      Execute: vagrant destroy --force
      configures storage mediums (FAILED - 1)

Failures:

  1) provider/parallels/disk/basic it should behave like provider/disk/basic configures storage mediums
     Got 0 failures and 2 other errors:
     Shared Example Group: "provider/disk/basic" called from

     1.1) Failure/Error: raise ArgumentError, message

          ArgumentError:
            A list of notify subscriptions must be given if a block is given
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/lib/vagrant-spec/subprocess.rb:52:in `execute'
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/lib/vagrant-spec/subprocess.rb:28:in `execute'
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/lib/vagrant-spec/acceptance/isolated_environment.rb:62:in `execute'
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/lib/vagrant-spec/acceptance/rspec/context.rb:54:in `execute'
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/lib/vagrant-spec/acceptance/rspec/context.rb:61:in `assert_execute'
          # /Users/legal/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/bundler/gems/vagrant-spec-708be5c53ea1/acceptance/disk/basic_spec.rb:14:in `block (2 levels) in <top (required)>'

The route cause is the way how Ruby 3.0 handle the argument delegation.
See more details in the section "Handling argument delegation" here: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

legal90 added a commit to Parallels/vagrant-parallels that referenced this pull request Mar 22, 2023
- Pin `vagrant` to the latest release tag `v2.3.4`. Current `main` branch has unreleased changes which brakes our
acceptance tests. Ref: hashicorp/vagrant#13052 (comment)

- Pin `vagrant-spec` to a PR branch, which contains the fix for Ruby 3.0 runtime:
hashicorp/vagrant-spec#56
legal90 added a commit to Parallels/vagrant-parallels that referenced this pull request Mar 22, 2023
- Pin `vagrant` to the latest release tag `v2.3.4`. Current `main` branch has unreleased changes which brakes our
acceptance tests. Ref: hashicorp/vagrant#13052 (comment)

- Pin `vagrant-spec` to a PR branch, which contains the fix for Ruby 3.0 runtime:
hashicorp/vagrant-spec#56
@legal90
Copy link
Contributor Author

legal90 commented Feb 15, 2024

Hi Vagrant team! Are you interested to get it merged?
cc @NodyHub, @vancluever

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

Successfully merging this pull request may close these issues.

1 participant