-
Notifications
You must be signed in to change notification settings - Fork 125
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 no-auto-update
flag
#257
Conversation
Also I think the |
Rustfmt change makes sense to me, good catch! About the auto update: Auto update is a convenience feature and having to specify this flag is inconvenient. What if we only warn if auto updates fail because one is offline? @dbrgn |
I'm not particularly convinced that automatic detection of network availability/condition is a full solution, mostly for the reason that oftentimes network failure/non-availability manifests in the form of a timeout after an extensive wait. Imagine being on a train in a remote region with questionable cellular coverage and using your mobile hotspot for internet - it's pretty likely that the update doesn't fail immediately but suffers from terrible speed and frequent retries. Truth be told, this is in fact my exact situation a few days ago. That being said I do agree that if auto update fails, it's better to make it a warning rather than a hard error. So this change would be a welcomed one in my books - I just don't think it solves the problem fully. I would insist that there needs to be a manual "off switch" for situations where the network is not completely dead but pretty unreliable. At least having the option of typing an additional flag and getting a response reliably is better than having to wait out a network timeout, or worse, not being able to use the client at all. |
Okay, I can see your point. If we implement this, I would make the setting more generic, like "offline" or so. I did a quick search whether there is a convention for this kind of setting, but I couldn't find one. If there would be some (linux) convention that, let's say the |
The empty To keep this discussion focussed on the no-auto-update flag, I'll cherry-pick that commit onto the main branch. |
rustfmt.toml
and added no-auto-update
flagno-auto-update
flag
I don't think there's a generic "offline"-variable, or at least I've never heard of such a thing. It would also open up a lot of questions, e.g. what happens if you run I think having a |
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.
@cyqsimon can you rebase your branch against main
and also update the usage docs with the changed ?
cargo run -- --help > docs/src/usage.txt
I'm not very familiar with this workflow of cherry picking commits in the middle of a PR. Hopefully I haven't managed to screw everything up.
|
I updated the completion scripts but I haven't tested them. As aforementioned, I do not have experience working with those so I might be making beginner mistakes. Please review these changes rather cautiously. |
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.
LGTM now. @niklasmohrin do you agree?
I'm not very familiar with this workflow of cherry picking commits in the middle of a PR. Hopefully I haven't managed to screw everything up.
Everything looks correct 🙂 If you have any future questions regarding git, don't hesitate to ask, we're happy to help.
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.
Code change looks good, I want to discuss some texts though :^)
Ahh, now the branch conflicts with the pull request #259 that was merged just recently 🙈 @cyqsimon if you want to update the pull request yourself:
If you want us to merge or rebase your commits for you, that's no problem either, just let us know! |
Done |
rustfmt.toml
enforces default formatter settings regardless of user's global settingsno-auto-update
flag allows the client to stay usable in such situationsI will need some help with the completion scripts since I have no experience with these.