-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
@@ -0,0 +1,57 @@ | |||
# frozen_string_literal: true | |||
module Bundler | |||
class CLI::Pristine |
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.
please nest the class inside the namespace
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.
Didn't I already done the nesting?
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.
never mind, this seems to be how the other CLI classes do it
bb1d816
to
1449b8b
Compare
@@ -42,6 +42,7 @@ class LockfileError < BundlerError; status_code(20); end | |||
class CyclicDependencyError < BundlerError; status_code(21); end | |||
class GemfileLockNotFound < BundlerError; status_code(22); end | |||
class PluginError < BundlerError; status_code(23); end | |||
class PristineError < BundlerError; 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.
needs a status code
☔ The latest upstream changes (presumably #4732) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #4632) made this pull request unmergeable. Please resolve the merge conflicts. |
f0b087b
to
3be4738
Compare
def pristine(gems, git_gems = nil, lazy_spec_provided = false) | ||
gem_list = lazy_spec_provided ? gems.map(&:name) : gems | ||
check_conflicting(gem_list, options[:skip]) | ||
pristine_gems = gem_list - options[:skip] |
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.
@RochesterinNYC
To make line 53 & this line work I need to implement a "-" and a "&" on SpecSet
since gem_list
here could be an Array or an instance of SpecSet
and options[:skip] would always be array. But I don't know if this would be somehow "bad practice" ? What's your opinion?
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.
Casting and then performing the operations could be a possibility? Why can gem_list
be either an array or a SpecSet instead of always one or the other?
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.
When it's not provided by the user, it's from the definition's locked_spec so it is a SpecSet and using a SpecSet rather than an array could provide the version information
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 don't know that a -
and &
method on the actual SpecSet
itself is the right solution. Maybe write a method that handles the casting and comparison and then at the end, we can gauge whether it really belongs on the class itself?
392c0a5
to
b523d9a
Compare
☔ The latest upstream changes (presumably #4676) made this pull request unmergeable. Please resolve the merge conflicts. |
e691e0f
to
b01acd9
Compare
☔ The latest upstream changes (presumably #4770) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #4765) made this pull request unmergeable. Please resolve the merge conflicts. |
664cc7f
to
3485606
Compare
☔ The latest upstream changes (presumably #4877) made this pull request unmergeable. Please resolve the merge conflicts. |
3485606
to
f0e5895
Compare
Change from bundle exec to gem pristine
f0e5895
to
fc53a6f
Compare
☔ The latest upstream changes (presumably #4891) made this pull request unmergeable. Please resolve the merge conflicts. |
@allenzhao what's the status on this? |
gem_list = lazy_spec_provided ? gems.map(&:name) : gems | ||
skip_gems = options[:skip] | ||
pristine_gems = compute_pristine_gems(gem_list, skip_gems) | ||
binding.pry |
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.
is pry
here intentionally?
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.
Yes, it's still a WIP.
@segiddins I haven't been able to pick up these PRs. I will manage to start working on them this week, but first I think I need some time to follow up on the current status of bundler dev. |
Closed by #5503. |
gem pristine