-
Notifications
You must be signed in to change notification settings - Fork 55
refactor(HISHTORY_PATH)!: Relative to absolute. #306
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 2ff52a8.
Thanks for your work on this! Yet, one thing to consider, how about backward compatibility? It looks like this change will break existing setups. |
I prefixed this commit with In this case I think using relative paths for this is simply too far away from what the norm is with env variables for shell tools - its all absolute. Having relative path in the first place is not that useful. If you insist on having a relative path then just expand it in See #276 |
@dezza, I think I understand your perspective, and I want to clarify I’m not suggesting that we should actively encourage the use of relative paths. My main concern is the existing users – this project has been around for two years and has an established user base. I believe that if we can maintain backward compatibility without significant overhead or efforts, that's the way. What do you think? |
I don't think its a good idea. It would be better to warn people if attempting to use a relative path after update. |
That sounds interesting. Warning is way better than just breaking it. Personally, I'd vote for backward compatibility, but I'll be genuinely happy if it will not break someone's experience silently. That would be very nice improvement, thank you for sharing it. |
But is there a future for that backward compatibility "feature"? Did you see how much repetitive code it removed regarding homedirs? The fact it had to be relative path puzzled me from the very start. It wasn't immediately obvious and opposite of common practice regarding path for ENV vars. There is no purpose either, since its not supposed to be portable like a Relative / Absolute path is equally valid for |
I hope there isn't, and that no one will use it. But what does have a future is the project itself and its reputation. Sometimes when I make libraries or applications, I make mistakes. In my experience, when building libraries or applications, I sometimes make mistakes. But once users (if we're lucky enough to have them) start relying on the code, even if it's not ideal, it becomes part of their workflow. I value my users, I respect the time they spent adapting to my mistakes, so if I can maintain backwards compatibility, I do so. And I value projects which respects this. That said, I really value your contribution, you are doing it for free and deserve gratitude. I also appreciate this conversation; I’m just another user who cares about the project, not a maintainer. My opinion about the code is that if it helps users convenience – it makes sense to me. We read the code occasionally, but we use it daily. If I have too many lines of repetitive code, I just make a function. Also, I want to note that I don’t have any more authority over this project than you do, I’m just another happy user. If you feel strongly that this change should go through, and it'll benefit the project, I completely respect that. |
Sure thing, no hard feelings :) I value new eyes on all the contributions I make and its just as inspiring to me. In this particular case I think it was the wrong choice from the start, so minimizing the additional code that is leaning into the anti-pattern I think is way forward to that breaking change. I still think a check + warning if you use a relative path forward is good user experience until its been the standard for years, instead of cutting the cord and just be like "read the changelog or expect it to not work one day". Whether it will only be merged later on a major version bump is fine by me, even if the project is new and has many users its still relatively early, what I would consider alpha. |
Removes relative path logic for $HISHTORY_PATH and instead expands $HOME BREAKING CHANGE: Users need to update their $HISHTORY_PATH env variable.
BREAKING CHANGE: HISHTORY_PATH is now absolute.
Removes relative path logic for
$HISHTORY_PATH
and instead expands$HOME
Gets
$HOME
fromgolang/os
os.UserHomeDir()
instead ofctx
. Deprecates old helper function, reverts temporary guard-conditional.#276
BREAKING CHANGE: Users need to update their $HISHTORY_PATH env variable.