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

dry-types 0.13.0 breaks how rom-relations uses relations #494

Closed
joelvh opened this issue May 4, 2018 · 5 comments
Closed

dry-types 0.13.0 breaks how rom-relations uses relations #494

joelvh opened this issue May 4, 2018 · 5 comments

Comments

@joelvh
Copy link

joelvh commented May 4, 2018

Got errors with dry-types 0.13.0 with map_with calls on relations in repositories.

Locking in dry-types 0.12.2 fixes this.

An error occurred while loading ./spec/rom/env_spec.rb.
Failure/Error: require 'rom-repository'
NameError:
  undefined method `map_with' for class `ROM::Relation::Curried'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation/curried.rb:26:in `<class:Curried>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation/curried.rb:19:in `<class:Relation>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation/curried.rb:10:in `<module:ROM>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation/curried.rb:9:in `<top (required)>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation.rb:16:in `require'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/relation.rb:16:in `<top (required)>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/core.rb:11:in `require'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-core-4.2.0/lib/rom/core.rb:11:in `<top (required)>'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-repository-2.0.2/lib/rom-repository.rb:1:in `require'
# /home/travis/.rvm/gems/ruby-2.5.1/gems/rom-repository-2.0.2/lib/rom-repository.rb:1:in `<top (required)>'
# ./lib/ruby_event_store/rom.rb:3:in `require'
# ./lib/ruby_event_store/rom.rb:3:in `<top (required)>'
# ./spec/spec_helper.rb:1:in `require'
# ./spec/spec_helper.rb:1:in `<top (required)>'
# ./spec/rom/env_spec.rb:1:in `require'
# ./spec/rom/env_spec.rb:1:in `<top (required)>'
@flash-gordon
Copy link
Member

rom 4 isn't compatible with the recent dry-types/dry-struct releases, there's a branch which nearly works #478 but atm this has a breaking change

@solnic
Copy link
Member

solnic commented May 4, 2018

we gotta push a new release with fixed version spec for dry-types :/

@flash-gordon
Copy link
Member

@solnic we first need to discuss the plan in #478 (comment) If we fix the spec it will be a breaking change so we can't do it. Instead, we can mimic the current behavior in 4.0 but change it in 5.0, or leave it as it is (inconsistent with current dry-struct behavior).

@solnic
Copy link
Member

solnic commented May 4, 2018

@flash-gordon we can't push a 4.x release that also upgrades dry-types/struct, because this would potentially break rom structs and/or custom types that people may have. So our only option, for now, is to push a 4.x release with dry-types/struct version specs updated to dry-types ~> 0.12.2 and dry-struct ~> 0.4.0.

@flash-gordon
Copy link
Member

4.2.1 pushed to rubygems

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

No branches or pull requests

3 participants