pocke / rbs_rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copied signature files produce an error

jasonlor opened this issue · comments

commented

While running steep check, I'm seeing the following error:

Unexpected error: #<RBS::GenericParameterMismatchError: sig/rbs_rails/sig/generated/activesupport.rbs:2894:0...2956:3: Generic parameters mismatch: ::Enumerable>

 /Users/jasonlor/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rbs-0.17.0/lib/rbs/environment.rb:53:in `block in validate_type_params'

Which RBS Rails version do you use?
I guess the latest release doesn't work well because of too old. If you use a released version, could you try using the HEAD of the master branch of this repository?

Or you can use RBS Rails v0.4.0, I just released it now.

commented

Just updated to RBS v0.4.0. Still hitting the same error. I'm on gem "rails", "~> 6.0.3"

This is the diff after upgrading and executing rake copy_signature_files

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   Gemfile.lock
	modified:   sig/rbs_rails/sig/active_record.rbs
	modified:   sig/rbs_rails/sig/generated/actionpack.rbs
	modified:   sig/rbs_rails/sig/generated/actionview.rbs
	modified:   sig/rbs_rails/sig/generated/activemodel.rbs
	modified:   sig/rbs_rails/sig/generated/activerecord.rbs
	modified:   sig/rbs_rails/sig/generated/activesupport.rbs
	modified:   sig/rbs_rails/sig/generated/railties.rbs
	modified:   sig/rbs_rails/sig/rack.rbs

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	sig/rbs_rails/sig/generated/activejob.rbs
	sig/rbs_rails/sig/patches/
	sig/rbs_rails/sig/pg.rbs
	sig/rbs_rails/sig/que.rbs
	sig/rbs_rails/sig/queue_classic.rbs
	sig/rbs_rails/sig/sidekiq.rbs
	sig/rbs_rails/sig/sneakers.rbs
	sig/rbs_rails/sig/sucker_punch.rbs

I guess you still use old RBS, because the error range doesn't make sense.

https://github.com/pocke/rbs_rails/blob/master/assets/sig/generated/activesupport.rbs#L2894-L2956

But, I got a similar error on CI. https://travis-ci.com/github/pocke/rbs_rails/jobs/443294219
I guess it is related to ruby/rbs#474. I'll fix the error. I guess it will fix your error.

Or I guess downgrade RBS version to that doesn't include the patch if you'd like to use RBS Rails without fixing this problem.

Thanks.

commented

I'm using from Gemfile.lock

    rbs (0.17.0)
    rbs_rails (0.4.0)

Thanks for the quick response!

I've releaed v0.4.1