-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement a Generic Package Latest Version Finder #11675
Implement a Generic Package Latest Version Finder #11675
Conversation
fix common spec issues
end | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Tip: Moved into common/lib/dependabot/package
@@ -1,35 +0,0 @@ | |||
# typed: strong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Tip: Moved into common/lib/dependabot/package
@@ -1,80 +0,0 @@ | |||
# typed: strong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Tip: Moved into common/lib/dependabot/package
end | ||
def initialize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Tip: Moved into dependabot/package/package_latest_version_finder
, Dependabot::Package::PackageLatestVersionFinder
abstract class.
# Represents a single package version | ||
module Dependabot | ||
module Package | ||
class PackageLanguage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this? I think we already have a Version
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is specifically keep information related to language from fetched for release. libraries if written for different language it will also include that. That's why we are keeping the details. You can check here in the following code. Example python library version can have something like CP37 (CPython 3.7), (Python 3.7) and so on.
Language keep information such as language, version and requirement all together for specific release. Currently we are using requirement to filter out versions.
# Represents a single package version | ||
module Dependabot | ||
module Package | ||
class PackageRelease |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe call this Release
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Release so general. So was thinking it may mix up with other things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that this is a refactoring and move of existing code; ignore my earlier comments.
Thanks for the review |
What are you trying to accomplish?
This PR refactors
LatestVersionFinder
intoPackageLatestVersionFinder
, making it more generic and reusable across different ecosystems. The primary goal is to move common logic intocommon
, enabling other ecosystems to extend the abstract class without duplicating logic. Additionally,PackageRelease
,PackageDetails
, andPackageLanguage
have been structured in a standard format, allowing Python and other package managers to adopt a unified approach.What issues does this affect or fix?
PackageLatestVersionFinder
across ecosystems.PackageRelease
,PackageDetails
, andPackageLanguage
intocommon
for broader usage.Anything you want to highlight for special attention from reviewers?
PackageLatestVersionFinder
.How will you know you've accomplished your goal?
PackageLatestVersionFinder
is successfully used across multiple ecosystems.Checklist