scalefactory / aws-assume-role

Apache License 2.0
34 stars 8 forks source link

incompatible with dry-types 0.15.0 #41

Open farkasmate opened 5 years ago

farkasmate commented 5 years ago

dry-types 0.15.0 breaks object types, Dry::Types::Struct seems to be a substitute.

[dry-types] Dry::Types.module is deprecated and will be removed in the next major version
Use Dry.Types() instead. Beware, it exports strict types by default, for old behavior use Dry.Types(default: :nominal). See more options in the changelog

[dry-types] Dry::Types.module is deprecated and will be removed in the next major version
Use Dry.Types() instead. Beware, it exports strict types by default, for old behavior use Dry.Types(default: :nominal). See more options in the changelog

/home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-container-0.7.0/lib/dry/container/resolver.rb:22:in `block in call': Nothing registered with the key "object" (Dry::Container::Error)
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-container-0.7.0/lib/dry/container/resolver.rb:21:in `fetch'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-container-0.7.0/lib/dry/container/resolver.rb:21:in `call'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-container-0.7.0/lib/dry/container/mixin.rb:115:in `resolve'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-container-0.7.0/lib/dry/container/mixin.rb:128:in `[]'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-types-0.15.0/lib/dry/types.rb:77:in `block in []'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:193:in `block in fetch_or_store'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:172:in `fetch'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:192:in `fetch_or_store'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/dry-types-0.15.0/lib/dry/types.rb:68:in `[]'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/profile_configuration.rb:11:in `<class:ProfileConfiguration>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/profile_configuration.rb:6:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/store/shared_config_with_keyring.rb:6:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/store/shared_config_with_keyring.rb:6:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role.rb:3:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role.rb:3:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/includes.rb:5:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/includes.rb:5:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/abstract_action.rb:3:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/abstract_action.rb:3:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/configure_profile.rb:3:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/actions/configure_profile.rb:3:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/commands/configure.rb:3:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli/commands/configure.rb:3:in `<top (required)>'
    from /usr/share/rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/share/rvm/rubies/ruby-2.3.5/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/gli-2.18.0/lib/gli/app.rb:324:in `block in load_commands'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/gli-2.18.0/lib/gli/app.rb:321:in `each'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/gli-2.18.0/lib/gli/app.rb:321:in `load_commands'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/gli-2.18.0/lib/gli/app.rb:34:in `commands_from'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli.rb:16:in `<module:Cli>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/lib/aws_assume_role/cli.rb:7:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/bin/aws-assume-role:4:in `require_relative'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/gems/aws_assume_role-1.2.1-universal-linux/bin/aws-assume-role:4:in `<top (required)>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/bin/aws-assume-role:23:in `load'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/bin/aws-assume-role:23:in `<main>'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:24:in `eval'
    from /home/matefarkas/.rvm/gems/ruby-2.3.5/bin/ruby_executable_hooks:24:in `<main>'
MrPrimate commented 5 years ago

Workaround: pin lower drytypes version in #42

MrPrimate commented 5 years ago

THis might require dropping Ruby 2.3 support for dry-validation support

MrPrimate commented 5 years ago

The All type is now used instead of object.

The blocker I have reached is that v0.15.0 needs a new version of dry-validation that is currently in development, the model currently used is being re-written. We are using dry-validation in a pretty funky way, and I can't currently get it to work the way I want.

Work so far is in https://github.com/scalefactory/aws-assume-role/tree/20190326_ruby3.5 but I'm going to leave this for now and visit again when dry-validation rewrite is stable.