Tests on activerecord v6.1 fail
fabon-f opened this issue · 1 comments
fabon-f commented
When I executed bin/test gems/activerecord/6.1
an error occurred:
Testing gems/activerecord/6.1...
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Writing lockfile to ~/path/to/gem_rbs_collection/gems/activerecord/6.1/_test/Gemfile.lock
Using activemodel:6.0 (~/path/to/gem_rbs_collection/gems/activemodel/6.0)
Using activerecord:6.1 (~/path/to/gem_rbs_collection/gems/activerecord/6.1)
Using activesupport:6.0 (~/path/to/gem_rbs_collection/gems/activesupport/6.0)
Using concurrent-ruby:1.1 (~/path/to/gem_rbs_collection/gems/concurrent-ruby/1.1)
Using date:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/date/0)
Using erb:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/erb/0)
Using i18n:1.10 (~/path/to/gem_rbs_collection/gems/i18n/1.10)
Using logger:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/logger/0)
Using minitest:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/minitest/0)
Using monitor:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/monitor/0)
Using mutex_m:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/mutex_m/0)
Using pathname:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/pathname/0)
Using securerandom:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/securerandom/0)
Using singleton:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/singleton/0)
Using time:0 (~/.rbenv/versions/3.3.3/lib/ruby/gems/3.3.0/gems/rbs-3.5.1/stdlib/time/0)
Using tzinfo:2.0 (~/path/to/gem_rbs_collection/gems/tzinfo/2.0)
It's done! 16 gems' RBSs now installed.
# Type checking files:
.........................................................................................................................................................F
activerecord-generated.rb:1:6: [error] Cannot find implementation of method `::User#articles`
│ Diagnostic ID: Ruby::MethodDefinitionMissing
│
└ class User < ActiveRecord::Base
~~~~
activerecord-generated.rb:22:20: [error] Cannot find the declaration of constant: `ActionController`
│ Diagnostic ID: Ruby::UnknownConstant
│
└ user.articles.build(ActionController::Parameters.new)
~~~~~~~~~~~~~~~~
Detected 2 problems from 1 file
1 method call with untyped receiver detected from activerecord-generated.rb. Please assign the expected type to the receiver
The test files contain code like this:
# RBS
def f: () -> untyped
# Ruby
f.something
In this case, `f` accepts any method calls because it's untyped. It tests nothing. Let's fix it!
=> Failure 🚨
# Failed gems
gems/activerecord/6.1
fabon-f commented
I also noticed that test_all_gems
check is not executed in CI now. Is it intentional?