Closed ojab closed 1 year ago
I guess it could be expected (i. e. dry-types should be updated to >~ 1.6 to make it work), but for the user it's unexpected.
>~ 1.6
require 'bundler/inline' gemfile do source 'https://rubygems.org' gem 'dry-types', '1.5.1' gem 'dry-logic', '~> 1.3' end module Types include Dry.Types() Email = String.constrained(format: /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i) Age = Integer.constrained(gt: 18) end
$ ruby /tmp/d.rb …/gems/dry-types-1.5.1/lib/dry/types/constraints.rb:20:in `block in Rule': undefined method `build' for Dry::Logic::Rule::Predicate:Class (NoMethodError) Logic::Rule::Predicate.build( ^^^^^^
It works!
I don't think there's much to be done beyond updating dry-types. Since dry-types depends on dry-logic, one can consider it a bug in dry-types.
Describe the bug
I guess it could be expected (i. e. dry-types should be updated to
>~ 1.6
to make it work), but for the user it's unexpected.To Reproduce
Expected behavior
It works!
My environment