This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Disable automatic check for updates when "Automatically Update" is disable [WIP] #1006
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.
Description of the Change
This change disables the periodic checking for package updates when
core.automaticallyUpdate
is unset. A warning is displayed to the user in the Updates pane, that no automatic checks for updates are performed. Additionally the message"All of your installed packages are up to date!"
is only shown directly after manually triggering the check.Alternate Designs
Another approach would have been to express the no-check-for-updates-yet-perfomed state explicitly in the
PackageManager
class and then communicate it to the UI. As a consequence, the usage of thePackageManager
would need to be reworked.Alternatively, only the call sites of
PackageManager::getOutdated
could be modified, to checkcore.automaticallyUpdate
before calling. There are three such sites within the settings-view package, potentially more in other packages.I think, the proposed solution is minimally invasive, as the call sites do not need any modification.
Benefits
Up until now, Atom checks at every startup and after that in ten minutes intervals the availability of updates for all installed packages. People with limited mobile plans have complained about these automatic checks (See for example https://discuss.atom.io/t/open-how-to-prevent-atom-to-update-packages-at-each-reload/45638/5 or the mentioned issues).
Even though atom just checks for possible updates, and does not actually download or install them, people seem to expect that no such network traffic is generated when the option "Automatically Update" is disabled.
Possible Drawbacks
When the option
core.automaticallyUpdate
is disabled, the message"All of your installed packages are up to date!"
is only shown directly after the check is performed, and is not shown the next time the pane is accessed. Ideally this message is displayed for the next ten minutes after a successful check.Applicable Issues
TODOs
PackageManager