Closed ksss closed 3 years ago
gem delayed_job_active_record use ActiveRecord::Base for superclass. https://github.com/collectiveidea/delayed_job_active_record/blob/d65b0f9900f5b0c78c341c7c0209c2d138d64ec5/lib/delayed/backend/active_record.rb#L33
ActiveRecord::Base
Then, rbs_rails:all task generate following rbs file.
rbs_rails:all
module Delayed module Backend module ActiveRecord class Job < ActiveRecord::Base class ActiveRecord_Relation < ActiveRecord::Relation class ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
Then, steep check displays the following error.
steep check
sig/rbs_rails/app/models/delayed/backend/active_record/job.rbs:4:6: [error] Cannot find type `ActiveRecord::Base` │ Diagnostic ID: RBS::UnknownTypeName │ └ class Job < ActiveRecord::Base ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sig/rbs_rails/app/models/delayed/backend/active_record/job.rbs:445:8: [error] Cannot find type `ActiveRecord::Relation` │ Diagnostic ID: RBS::UnknownTypeName │ └ class ActiveRecord_Relation < ActiveRecord::Relation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sig/rbs_rails/app/models/delayed/backend/active_record/job.rbs:451:8: [error] Cannot find type `ActiveRecord::Associations::CollectionProxy` │ Diagnostic ID: RBS::UnknownTypeName │ └ class ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Detected 3 problems from 1 file
This PR fixes this problem as follows.
module Delayed module Backend module ActiveRecord class Job < ::ActiveRecord::Base class ActiveRecord_Relation < ::ActiveRecord::Relation class ActiveRecord_Associations_CollectionProxy < ::ActiveRecord::Associations::CollectionProxy
gem delayed_job_active_record use
ActiveRecord::Base
for superclass. https://github.com/collectiveidea/delayed_job_active_record/blob/d65b0f9900f5b0c78c341c7c0209c2d138d64ec5/lib/delayed/backend/active_record.rb#L33Then,
rbs_rails:all
task generate following rbs file.Then,
steep check
displays the following error.This PR fixes this problem as follows.