-
Notifications
You must be signed in to change notification settings - Fork 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
Add Bundler v1 Deprecation Warning #10421
Conversation
|
||
abstract! | ||
|
||
# The name of the package manager (e.g., "bundler") |
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 was wondering if as part of this effort we make these constants too?
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 am currently keeping it as constants in bundler/package_manager. Do you mean something different since you are pointing in PackageManagerBase
? Something like enum types?
next false if dep.previous_requirements.nil? | ||
|
||
dep_previous_requirements = dep.previous_requirements | ||
next false if dep_previous_requirements.nil? |
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.
It seems like some unrelated changes like these and the types for all the methods have gotten into this PR? Try to keep extra changes out since it's already quite large of a change.
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 change is just using variable to solve sorbet issue regarding dep.previous_requirements
being not empty when passing to the dependency below. `requirements: dep.previous_requirements. If we don't use that we need to use T.must to tell the sorbet that it is not going to be empty.
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'm not sure why we needed to fully type this file, it's better to keep a PR focussed on doing one thing. Often typing a file can cause unrelated problems. Partially typing new methods is preferred in this case.
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 just replaced it to make it T.must since above we already have nil check.
c87d344
to
9fd9bcd
Compare
bc3dce1
to
6a673a5
Compare
e6a6ea7
to
5354eed
Compare
|
||
abstract! | ||
|
||
# The name of the package manager (e.g., "bundler") |
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 am currently keeping it as constants in bundler/package_manager. Do you mean something different since you are pointing in PackageManagerBase
? Something like enum types?
next false if dep.previous_requirements.nil? | ||
|
||
dep_previous_requirements = dep.previous_requirements | ||
next false if dep_previous_requirements.nil? |
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 change is just using variable to solve sorbet issue regarding dep.previous_requirements
being not empty when passing to the dependency below. `requirements: dep.previous_requirements. If we don't use that we need to use T.must to tell the sorbet that it is not going to be empty.
be87895
to
4268800
Compare
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.
Nice work!
You can run a CLI job with a Bundler 1 repo and the experiment enabled as a sanity test, if you haven't already.
Thanks this is be my first time for for enabling experience. |
4268800
to
a375f7c
Compare
…in dependabot-core
…hat is applicable for eco-systems.
fixed specs
af09ae7
to
f57a848
Compare
* created abstraction for package manager information that can be used in dependabot-core * added generation of deprecation and unsupported notices for bundler that is applicable for eco-systems. * passed generated deprecation notice to pr message.
What are you trying to accomplish?
The goal of this PR is to enhance the file parser to return the
package_manager
information directly. This change has been implemented for Bundler, and other package managers can have this feature added in the future. This information will be used to check for deprecation warnings specifically for Bundler v1.What issues does this affect or fix?
This change allows us to better handle deprecation warnings for Bundler v1 by providing a consistent way to access package manager information directly from the file parser.
Anything you want to highlight for special attention from reviewers?
package_manager
method has been added to the base file parser.package_manager
method has been implemented and returns the necessary information for deprecation warnings.package_manager
method is currently not implemented but can be extended in the future.How will you know you've accomplished your goal?
package_manager
information directly.Checklist