-
Notifications
You must be signed in to change notification settings - Fork 372
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
Proposal: make krew info
work with multiple indexes
#559
Comments
Option 2I think I found a simplification/refinement: We change krew info foo # -> show default/foo
krew info my-index/foo Advantages:
Disadvantages:
|
I generally prefer option 2 over option 1, because it is more predictable and yields the same result regardless on which machine the command is executed on. To make our user's lives easier, we can offer them some guidance when no manifest is found. For example, when looking for plugin $ krew info bar
Plugin `default/bar` does not exist. Did you mean `krew info my-index/bar`? Lastly, the inconvenience about not being able to show info about plugins installed via |
I think for those people, I'd much rather prefer if |
Yeah, that's even better. |
Since we had 1 index up until now,
krew index
had been fairly easy to implement. It did not distinguish betweenReceipt
s orPlugin
s (ref:LoadManifestFromReceiptOrIndex
).In other words, an "installed" plugin could only come from the Plugin manifest with the same name –as there were no other index.
So now, by allowing multiple indexes,
krew info
now has to understand if:means
foo
the installed plugin (could be from any index), or thedefault/foo
uninstalled plugin.Option 1
I recommend we change krew info’s behavior.
krew info foo
means:foo
installed plugin (could be from any index)foo
uninstalled plugin (fromdefault
index)To disambiguate an "uninstalled" plugin, the user can run
krew info my-index/foo
. However, ifmy-index/foo
is installed, could the user have meant show the "installed" plugin?Keep in mind that
krew info
works on plugins installed via--manifest
(i.e. has no index, but recorded asdefault
with #555).I'm losing my train of thought here.
If you see a straightforward solution, let me know.
/cc @corneliusweig
cc: @chriskim06
/kind proposal
/area multi-index
The text was updated successfully, but these errors were encountered: