bibendi / dip

The dip is a CLI dev–tool that provides native-like interaction with a Dockerized application.
MIT License
1.26k stars 44 forks source link

dip fails with psych 4.0.0 #129

Closed hachi8833 closed 3 years ago

hachi8833 commented 3 years ago

Describe the bug

dip fails with the breaking changes in the newer psych 4.0.0 gem:

https://github.com/ruby/psych/pull/487

To Reproduce Steps to reproduce the behavior:

  1. gem update psych
  2. run any dip commands such as dip ls.
  3. dip fails.
$ dip sh
/Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/psych-4.0.0/lib/psych.rb:322:in `safe_load': wrong number of arguments (given 4, expected 1) (ArgumentError)
    from /Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/dip-7.1.0/lib/dip/config.rb:65:in `load_yaml'
    from /Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/dip-7.1.0/lib/dip/config.rb:107:in `config'
    from /Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/dip-7.1.0/lib/dip/config.rb:90:in `block (2 levels) in <class:Config>'
    from /Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/dip-7.1.0/lib/dip/cli.rb:27:in `start'
    from /Users/<username>/.config/anyenv/envs/rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/dip-7.1.0/exe/dip:23:in `<top (required)>'
    from /Users/<username>/.anyenv/envs/rbenv/versions/3.0.1/bin/dip:23:in `load'
    from /Users/<username>/.anyenv/envs/rbenv/versions/3.0.1/bin/dip:23:in `<main>'

The symptom is not related with the configs in dip.yml or docker-compose.yml.

Expected behavior

Any dip commands should work with psych 4.0.0.

Actually, just running gem uninstall psych resolves the issue because psych 3.3.0 is a "default gem" in the current Ruby 3.0.1p64.

$ gem uninstall psych
$ gem list|grep psych
psych (default: 3.3.0)

Context (please complete the following information):

Additional context

I guess there might occur some more fixes or changes regarding psych breaking changes. The situation might be in fluid.

https://bugs.ruby-lang.org/issues/17866

Rails has also been affected by the changes in psych:

https://github.com/rails/rails/pull/42249

bibendi commented 3 years ago

Sorry for the long delay. I've been on vacation. I will try to resolve the bug in this or next week.

alec-c4 commented 3 years ago

hey, any news regarding this bug?

bibendi commented 3 years ago

Hi, Fixed in v7.1.1

hachi8833 commented 3 years ago

Thank you very much!