Shopify / tapioca

The swiss army knife of RBI generation
MIT License
746 stars 128 forks source link

Find useless shim definitions from payload #645

Closed Morriar closed 2 years ago

Morriar commented 3 years ago

When we clean shims we do not consider Sorbet's payload RBIs.

This means that when a definition in our shims becomes useless because it's been upstreamed, we never clean it.

We should use Sorbet's symbol table to bootstrap the index and remove the outdated definitions.

Problem: how to know if the symbol in the table is actually attached to a signature? Maybe we should add an option to Sorbet so it can dump its internal RBIs?

Morriar commented 2 years ago

Pushed the first part so we can extract the content of the payload from the Sorbet version used: https://github.com/sorbet/sorbet/pull/5504.

Morriar commented 2 years ago

Done in https://github.com/Shopify/tapioca/pull/879 🎉