-
Notifications
You must be signed in to change notification settings - Fork 9
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
Include the binary's name when calling from_args()
#5
Comments
It works this way for a few reasons:
These are not very strong reasons. You might be right. But if we change it now, all code that uses Looking back, I wish I hadn't included I think that the best way forward is to deprecate If it's overhauled, |
Okay, this makes sense. I'm one of those few who do pass the name in their tests, and check that it's extracted as it should :) Although it wouldn't be hard for me to extract it manually, of course. The suggested overhaul looks like a fine solution to me too. Thanks for the thorough explanation! |
I'd like to do this today for the next release:
If the name can't be found then This'll mean a little churn for newsboat/newsboat#1845 (lines 234-239 can become How does it sound? |
Sounds fine to me! Changes like that I can adjust to quickly so no problem for me at least. |
I understand that these choices are driven by I'd make it |
I do feel conflicted about it. I mainly want to keep it like this because processing an I also feel that preserving But maybe keeping it an |
Oh! I didn't know. This would have been my only argument in favour of using
This looks good! |
In Rust, To get the path from |
Thanks! I knew that |
@blyxxyz Btw, will you notify us when 0.2.0 is live so that I can make the changes as speedily as possible? would greatly appreciate it! |
I've pushed the changes I want to make to |
Version 0.2.0 is live. Thank you for using the crate and discussing all these things! It's been very educational. I think the library is in a better state now. |
from_env()
takes the executable's name from the argv, butfrom_args()
expects an argv with the name removed. This discrepancy causes a bit of trouble:from_args()
, thenbin_name()
becomes useless (always returnsNone
)I think it'd be simpler for everyone involved if
from_args()
took the same input asfrom_env()
does, i.e. an argv with executable's name.The text was updated successfully, but these errors were encountered: