libyear-bundler icon indicating copy to clipboard operation
libyear-bundler copied to clipboard

When missing exact public version, search for closest published version

Open bensheldon opened this issue 1 year ago • 1 comments

I'm curious if you would support a feature/change: when an exact-match version cannot be found, to try to find the closest published version.

For example, we will sometimes vendor/cache gems with a custom version like 3.0.1.pre or 3.0.1.GITSHA that are never published, though 3.0.1 has been published.

It would be nice if libyear-bundler could instead calculate based off of 3.0.1 which has been published, instead of just outputting a 0.0 value.

bensheldon avatar Feb 22 '24 22:02 bensheldon

Hi Ben, I'd be happy to review a PR adding this feature as a CLI option. May I suggest --closest-published as the option name?

If you tackle this, you might consider a design pattern where there is an array of "matcher strategies". The first strategy would always be "exact match". The --closest-published option would add another strategy class to said array.

jaredbeck avatar Mar 19 '24 21:03 jaredbeck

This issue has been automatically marked as stale due to inactivity. The resources of our volunteers are limited. Bug reports must provide a script that reproduces the bug, using our template. Feature suggestions must include a promise to build the feature yourself. Thank you for all your contributions.

github-actions[bot] avatar Jun 18 '24 02:06 github-actions[bot]