add restart and check_interval helpers, document github rate limits and no-client compile error#194
Merged
Merged
Conversation
…e limits and the no-client compile error
- add `self_update::restart::{restart, restart_with}`: relaunch the (already
replaced) executable after an update so a long-running process picks up the new
binary. `restart()` reuses the current args; `restart_with(args)` supplies a fresh
arg list. unix replaces the image with `exec`; windows spawns and exits. (#62)
- add `self_update::check_interval::UpdateCheckGuard`: a stamp-file guard that
throttles update checks. `should_check()` reports whether the interval elapsed
since the last check (missing/corrupt/future stamps count as due); `record_check()`
stamps now via write-to-temp-then-rename. No time/date dependency. (#79)
- document github's api rate limits (60/hour vs 5000/hour with a token, the 403
symptom mapping to `Error::Unauthorized`, and mitigations) in the crate docs and
the `auth_token` setter. (#78)
- name the `no HTTP client selected` compile error in the Features section for a
client-less build (e.g. `default-features = false, features = ["rustls"]`) and show
the fix. (#168)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes four open-issue followups: two new opt-in helpers plus two doc gaps.
Helpers
self_update::restart::{restart, restart_with}(How to restart the process to update? #62): relaunch the already-replaced executable after an update so a long-running process picks up the new binary.restart()reuses the current args;restart_with(args)supplies a fresh arg list. Unix replaces the image withexec; Windows spawns and exits.self_update::check_interval::UpdateCheckGuard(Check for updates periodically #79): a stamp-file guard that throttles update checks.should_check()reports whether the interval elapsed since the last check (missing/corrupt/future stamps count as due);record_check()stamps now via write-to-temp-then-rename. No time/date dependency.Docs
Error::Unauthorized, and mitigations. Added to the crate docs and theauth_tokensetter.no HTTP client selectedcompile error (Clarify documentation on features #168) in the Features section for a client-less build (e.g.default-features = false, features = ["rustls"]) and show the fix.Specs updated alongside each change; CHANGELOG entries added.