Skip to content

GemPins pin merging improvements #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

apiology
Copy link
Contributor

@apiology apiology commented May 21, 2025

Put responsibility for intelligently merging multiple pins for the same underlying item (e.g. from different sources like YARD and RBS) into the Pin class hierarchy.

Changes were driven by using rbs_collection to gather more types for solargraph-rails. This resulted in the Rails gems having pins with up to four sources each - the .rb files themselves, the annotations in solargraph-rails, the auto-generated RBS files (with no types) in rbs_collection, and explicit types from solargraph-rails. Quality of types and signatures varied wildly, leading to logic to make a more informed decision on how to merge pins.

There's probably a future where some of the rbs_collection-driven heuristics inside move to a default config file that can be extended or maybe overridden by users.

Regression tests for these are the definition files in solargraph-rails: https://github.com/iftheshoefritz/solargraph-rails/tree/main/spec/definitions/rails7 - after #892 is merged, that will become part of our regression suite as well.

apiology added 2 commits May 21, 2025 07:47
Put responsibility for intelligently merging multiple pins for the
same underlying item (e.g. from different sources like YARD and RBS)
into the Pin class hierarchy.
@apiology apiology marked this pull request as ready for review June 2, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant