trailblazer / reform

Form objects decoupled from models.
https://trailblazer.to/2.1/docs/reform.html
MIT License
2.49k stars 184 forks source link

Reform 2.3 breaks `require 'reform/form/active_model/validations'` #508

Closed no-reply closed 4 years ago

no-reply commented 4 years ago

Removal of Reform::Form::Errors in v2.3.1 is a breaking change for existing downstream gems.

Should the release be yanked until a backwards compatible version exists?

Steps to reproduce

Expected behavior

There should be no errors; activemodel validation should load normally.

Actual behavior

See backtrace below.

System configuration

Reform version: 2.3.1

Full Backtrace of Exception (if any)

irb(main):001:0> require 'reform/form/active_model/validations'
Traceback (most recent call last):
       16: from /home/tjohnson/.rbenv/versions/2.7.0/bin/bundle:23:in `load'
       15: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:34:in `<top (required)>'
       14: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
       13: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:46:in `block in <top (required)>'
       12: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
       11: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
       10: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
        9: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
        8: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        7: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        6: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:506:in `console'
        5: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli/console.rb:19:in `run'
        4: from (irb):1
        3: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/reform-rails-0.1.7/lib/reform/form/active_model/validations.rb:5:in `<top (required)>'
        2: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/reform-rails-0.1.7/lib/reform/form/active_model/validations.rb:112:in `<module:ActiveModel>'
        1: from /home/tjohnson/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/reform-rails-0.1.7/lib/reform/form/active_model/validations.rb:113:in `<class:Errors>'
NameError (uninitialized constant Reform::Form::Errors)
no-reply commented 4 years ago

there's a related issue on the reform-rails side, asking for a pin to v2.2.x; https://github.com/trailblazer/reform-rails/issues/81

seuros commented 4 years ago

What version of reform-rails do you use ?

no-reply commented 4 years ago

the version installed with the procedure above is 0.1.7. that looks like the version in use in my actual projects, as well.

seuros commented 4 years ago
  gem 'reform', '~> 2.3.1'
  gem 'reform-rails', '~> 0.2.0.rc2'

can you try with this combo ?

no-reply commented 4 years ago

that seems to patch the immediate issue. i'll try running a full build with that configuration.

forcing use of a release candidate isn't a workable solution for my project, though.

seuros commented 4 years ago

we will release it shortly.