Closed ksss closed 6 months ago
"Verify format", "Check if the given name is stdlib", and "Check if we are missing a dependency" is checked if rbs collection
is used by rbs validate
and steep check
as you said.
I'm working on enabling rbs collection
on them, so it will be solved (soon I hope...)
The last problem will not be solved by my change. Personally I think it is not a high priority because it does not break anything even if there are unnecessary dependencies in manifest.yaml.
Good news.
Is it something that allows you to specify a local directory as source for rbs collection
?
Would you place rbs_collection.yaml in each gem directory?
Problem
gem's RBS often requires
manifest.yaml
, but there is no easy way to verify the correctness of this file. We can userbs collection install
to install dependent RBSs and runrbs validate
. However, this method is laborious.What we want to do
Verify format
It is easy to check the format of YAML.
Check if the given name is stdlib
I think it is possible to check if it is the name of stdlib from rbs.
Check if we are missing a dependency
When we run
rbs validate
andsteep check
andsteep stats
in_scripts/test
, we load manifest.yaml and add it to the dependencies.This should cause the test to fail if missing.
Check if we have too many dependencies
This check is difficult .......
Implementation
bin/check-manifest-yaml.rb
and check the structure of the yaml file, etc.bin/init_new_gem
and existing test code.bin/check-manifest-yaml.rb
in_scripts/test
manifest.yaml
whenrbs validate
in_scripts/test
.manifest.yaml
inSteepfile