Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Have "rebar3 plugins upgrade" work without specifying plugin name #2521
Have "rebar3 plugins upgrade" work without specifying plugin name #2521
Changes from 1 commit
de8bb90
10404ab
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 going to be rather slow or costly... you're calling the whole upgrade procedure for each plugin one at a time, including analysis. I can merge this since it's better than the current behaviour, but I'd look in seeing if we could improve this at some point by letting the code from lines 70 to 80 handle a larger set of applications in a list to build them at once.
It's not urgent since people upgrade plugins rather rarely, but the code is currently suboptimal.
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.
Sure, it's not urgent; and I will look into possibilities to improve it (this was mainly a first dirty approach to prove the concept). For context's sake: I've it plugged to CI, which means that I'm currently forced to know, beforehand, which plugins I want to upgrade and then do it. If it's in a generic Makefile, for example (whose consumers I know not what plugins chose), I could easily just call
rebar3 plugins upgrade
and letrebar3
take care of it. I'll change to draft to signal it's still ongoing.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.
Fred, while looking at this I just saw I'm not taking profiles into account, but it seems to work OK (still didn't do the proposed changes); is the state updated previously to make sure the profiles are those from the input?
Otherwise, I don't understand
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.
the global profile is one magic thing that is super odd. Otherwise, the merging of state and handling of profiles should be transparent and nobody should need to care about them. It's why we aim at people not needing to know which profiles they run under.
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.
Cool, then I guess I might "bypass" those lines in my analysis, as you propose only looking at the 70-80 range.
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.
We shouldn't block this PR on these improvements, they're more of a follow-up. Having something working slow is better than something that doesn't work at all 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.
Oh, cool. I'm OK to do that just now.