dry-rb / dry-validation

Validation library with type-safe schemas and rules
https://dry-rb.org/gems/dry-validation
MIT License
1.34k stars 188 forks source link

Consider release a new version with updated dependencies #733

Closed MiralDesai closed 7 months ago

MiralDesai commented 8 months ago

Describe the bug

I've run into an issue on a project where I cannot use the latest version of a gem (reek) because of it depends on dry-schema 1.13.0, however the latest version of dry-validations is on 1.12.0.

This is fine in my case as reek is a test dependency however since this gem hasn't been updated in a while, I imagine this issue will become more prevalent. My suggestion is to release a new version with dry-schema and possible other dependencies updated where possible.

To Reproduce

  1. Add dry-valiations to Gemfile and run bundle install
  2. Add reek to Gemfile with version pinned to latest (6.3.0)
  3. Run bundle install and observe the following output:
In snapshot (Gemfile.lock):
    dry-schema (= 1.12.0)

  In Gemfile:
    dry-schema

    dry-validation was resolved to 1.10.0, which depends on
      dry-schema (>= 1.12, < 2)

    reek (~> 6.3.0) was resolved to 6.3.0, which depends on
      dry-schema (~> 1.13.0)

Expected behavior

Gem installs are not blocked by dependency conflicts

My environment

bkuhlmann commented 8 months ago

I use the same combination in many of my projects as well but don't have an issue with compatibility on Ruby 3.2.0 or 3.3.0. I'm also not able to recreate your situation using the following script:

#! /usr/bin/env ruby
# frozen_string_literal: true

# Save as `demo`, then `chmod 755 demo`, and run as `./demo`.

require "bundler/inline"

gemfile true do
  source "https://rubygems.org"

  gem "reek", "~> 6.3"
  gem "dry-validation", "~> 1.10"
end

Are you able to reproduce your original error with the same script above?

MiralDesai commented 7 months ago

Thanks, got it working with your example and then investigated further to find a few other gems that were blocking the upgrade but were not bubbling up in the error message.