ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
247 stars 101 forks source link

Auto check manifest.yaml #267

Closed ksss closed 6 months ago

ksss commented 1 year ago

Problem

gem's RBS often requires manifest.yaml, but there is no easy way to verify the correctness of this file. We can use rbs collection install to install dependent RBSs and run rbs 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 and steep check and steep 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

pocke commented 1 year 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.

ksss commented 1 year ago

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?