Open obregonia1 opened 1 year ago
@lloeki I also heard about this from someone else. I'm wondering if it's not intended to include the RBS files in the gem package, for now.
RBS files under /sig
directory is loaded when a gem is installed, so adding .reject
call in your .gemspec
to exclude .rbs
files would be the solution.
A workaround for Steep/RBS users is adding ignore: true
entry in rbs_collection.yaml
to explicitly skip loading RBS files from the gem.
gems:
- name: libddwaf
ignore: true
@soutaro
Thank you for your comment.
I had changed rbs_collection.yaml
exactly as you described to avoid the error with environment of this issue's description. However, with below environment, we have confirmed that the error does not occur even though rbs_collection.yaml
is not modified.
libddwaf: 1.14.0.0.0
steep: 1.6.0
Ruby: 3.2.2
Hi. I ran
$ bundle exec steep check
, then I got error. Is it caused by the library itself, or my environment?vendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:32:8: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class UInt32Ptr < ::FFI::Structvendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:38:8: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class SizeTPtr < ::FFI::Structvendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:44:8: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class Object < ::FFI::Structvendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:89:10: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class Limits < ::FFI::Structvendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:96:8: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class RuleSetInfo < ::FFI::Structvendor/bundle/ruby/3.1.0/gems/libddwaf-1.8.2.0.0/sig/datadog/appsec/waf.rbs:122:8: [error] Cannot find type
::FFI::Struct
│ Diagnostic ID: RBS::UnknownTypeName │ └ class Result < ::FFI::Struct