-
Notifications
You must be signed in to change notification settings - Fork 370
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
Support XDG Directory Structure #815
Comments
I'm personally not sure if this is worth doing and introducing yet another way that's different to reason about specific to Linux. Previous proposals in kubectl project has stalled/rejected. kubernetes/kubernetes#97885, kubernetes/enhancements#2229 ... If more important tools aren't following XDG convention, making Krew to do so is not very useful. We offer facilities like KREW_ROOT env var that lets you customize installation path (where binaries and configs go etc), so that may help to some extent. |
Hello, you say "specific to linux" but are there any other non *nix OS that you have in mind ? Would you accept a PR if I find the time to do it ? |
Krew is fairly frequently used on Windows and MacOS so I'd prefer directory locations are uniform across these for easier support and documentation. Xdg is yet another thing to learn for maintainers and reason about during support requests. If kubectl (a fairly sophisticated tool that reads/writes a lot of config/state on local disk) doesn't follow suite, why do you want Krew (a much smaller project) to support it? Shouldn't you/we be going after the bigger fish if XDG is a case worth convincing people? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
To not litter the home directory with yet another directory. |
Even microsoft supports XDG hihi 😄 At this point programs that do not support it are more like the exception.. Let's try to make all this conversation more productive:If we make the changes and propose a PR that will make the tool work in both XDG and non XDG environments would you be willing to accept it ? |
Even Microsoft does it is sadly not a good argument. I'm less interested in the code itself and I explained my concerns above. Many existing users have ~/.krew dir already present and added to path, and these should not break. This also complicates the documentation aspects (like printing out a message to tell the users to add a specific directory to PATH after the installation). I'd be happy to see a thorough design (not necessarily code) that handles these cases and explains how it would work. |
Hello @ahmetb yes I understand your concerns, I was thinking about having it work for everyone so that nothing breaks for existing users and everyting is completely transperent and seamless. Check the two flow charts I sketched: I think these two cover all cases and will make it work for everyone.
Thank you once again for the great project and please let me know what you think. P.S I made the Microsoft comment just for a laugh :) I agree it is not a good argument hehe ! Kind Regards |
I believe this is how Git did it ~8 years ago. |
I'd also love to see this. I understand the support concerns as maintainers have to know/understand/reason about these things; but these are defined conventions generally speaking for the Operating Systems. These defined conventions are the follow if I'm not mistaken: Mac OS: Given the above from a support perspective you can still always refer users their configuration directory via something along the lines of this.
This provides a handful of benefits in my opinion. Users can always safely assume where to look for configurations given OS conventions are followed by default. Then on the flip side maintainers can always reference the provided configuration dir env var and generally not have to be concerned as to where the configuration actually lives. |
Hello,
It would be nice if the tool supported XDG directory structure as described in in freedesktop org:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Example: binaries in ~/.local/bin, configs in ~/.config etc
Thank you for your project,
Cheers !
The text was updated successfully, but these errors were encountered: