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

New version of dry-types (1.2.0) produced dependency conflicts #555

wants to merge 2 commits into
base: unstable


Copy link

commented Oct 7, 2019

We've tried to upgrade a dependency and got errors running Bundler. It looks like there is a version conflict between two or more dependencies. Depfu doesn't try to solve these, as this would mean to update more than one dependency at a time.

Please take a look at the exact failure to figure out if this is something you need to work on.

The bundler error message was:

Bundler could not find compatible versions for gem "dry-types":
  In Gemfile:
    dry-types (~> 1.2.0)

    rom-sql (~> 1.3, >= 1.3.5) was resolved to 1.3.5, which depends on
      dry-types (~> 0.11.0)

What changed?

✳️ dry-types (~> 0.11.0 → ~> 1.2.0) · Repo · Changelog

Release Notes


1.2.0 2019-10-06


  • Dry::Types.[] used to work with classes, now it's deprecated (flash-gordon)


  • Bug with using a Bool-named struct as a schema key (flash-gordon)
  • A bunch of issues related to using meta on complex types (flash-gordon)
  • Types.Constructor(...) returns a Types::Array as it should (flash-gordon)


  • Optional::Params types that coerce empty strings to nil (flash-gordon)

    Dry::Types['optional.params.integer'].('') # => nil
    Dry::Types['optional.params.integer'].('140') # => 140
    Dry::Types['optional.params.integer'].('asd') # => exception!

    Keep in mind, Dry::Types['optional.params.integer'] and Dry::Types['params.integer'].optional are not the same, the latter doesn't handle empty strings.

  • Predicate inferrer was ported from dry-schema (authored by solnic)

    require 'dry/types/predicate_inferrer'[Types::String]
    # => [:str?][Types::String | Types::Integer]
    # => [[[:str?], [:int?]]]

    Note that the API of the predicate inferrer can change in the stable version, it's dictated by the needs of dry-schema so it should be considered as semi-stable. If you depend on it, write specs covering the desired behavior. Another option is copy-and-paste the whole thing to your project.

  • Primitive inferrer was ported from dry-schema (authored by solnic)

    require 'dry/types/primitive_inferrer'[Types::String]
    # => [String][Types::String | Types::Integer]
    # => [String, Integer][Types::String.optional]
    # => [NilClass, String]

    The primitive inferrer should be stable by now, you can rely on it.

  • The monads extension adds Dry::Types::Result#to_monad. This makes it compatible with do notation from dry-monads. Load it with Dry::Types.load_extensions(:monads) (skryukov)

    Types = Dry.Types

    class AddTen
    include Dry::Monads[:result, :do]

    def call(input)
    integer = yield Types::Coercible::Integer.try(input)

    <span class="pl-c1">Success</span>(integer <span class="pl-k">+</span> <span class="pl-c1">10</span>)


Compare v1.1.1...v1.2.0

Does any of this look wrong? Please let us know.


See the full diff on Github. The new version differs by 32 commits:

Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
@depfu depfu bot added the depfu label Oct 7, 2019
@jodosha jodosha changed the base branch from master to unstable Oct 8, 2019
@jodosha jodosha self-assigned this Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.