-
Notifications
You must be signed in to change notification settings - Fork 138
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 show latest command that prints latest version that conform to contraints #536
base: master
Are you sure you want to change the base?
Conversation
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.
- Should we deem feat: allow to show required by module version explicitly #301 obsolete and close in favour of this PR? (I'm closing that PR for now)
- Do we need any tests for this new arg?
- On a side note, we probably may need to look into restraining simultaneous use of cmdline args that are not compatible with each other (I mean this is a thought aloud)
- I added commit suggestions to try and align this new arg with what it actually does (e.g. when version is provided via command line, this new arg does not show latest required, but outputs version requested on command line. same for
version
parameter in TOML. so on by means of all of theif
s fromlib/param_parsing/parameters.go
). WDYT? - Let me know if you'd like me to postpone new version release for
--arch
arg to get this PR added to the same release (or to cut next release for it later)
@@ -177,6 +179,7 @@ func initParams(params Params) Params { | |||
params.MirrorURL = "" | |||
params.ShowLatestFlag = false | |||
params.ShowLatestPre = lib.DefaultLatest | |||
params.ShowLatestRequiredFlag = false |
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.
params.ShowLatestRequiredFlag = false | |
params.ShowRequired = false |
case parameters.ShowLatestRequiredFlag: | ||
/* show latest stable version within constraints */ | ||
lib.ShowLatestRequiredVersion(parameters.MirrorURL, parameters.Version) |
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.
case parameters.ShowLatestRequiredFlag: | |
/* show latest stable version within constraints */ | |
lib.ShowLatestRequiredVersion(parameters.MirrorURL, parameters.Version) | |
case parameters.ShowRequired: | |
/* show version requested by configuration */ | |
lib.ShowRequiredVersion(parameters.MirrorURL, parameters.Version) |
openAI
Do we need any tests for this new arg?
On a side note, we probably may need to look into restraining simultaneous use of cmdline args that are not compatible with each other
Let me know if you'd like me to postpone new version release for
@yermulnik feel free to do the deployments for the release |
Given the argument just prints to stdout and we don't have any mocking, I wonder if updating the function to return the string that is displayed to the user back to
The other argparsers I've seen have got this kind of functionality, but can't see viper does - assume it's something you had to do manually in the past?
👍
Yes, I agree none of it makes much sense given it's high dependency on the argument parsing - it's somewhat of a shame that this is all done magically behind before the |
I like the |
@warrensbox @MatthewJohn |
@MatthewJohn Will you be giving this PR some love? =) |
Hey sorry,
Had a little birth in the family - will take a look in tje next 24h when I’m next awake :)
…Sent from my iPhone
On 5 Feb 2025, at 12:50, George L. Yermulnik ***@***.***> wrote:
@MatthewJohn Will you be giving this PR some love? =)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
Ah, congrats 🥳 Take your time and take some sleep =))) |
Issue #301