Skip to content
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

Make auto-self-update setting work when no-self-update feature is enabled #3051

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

autumnontape
Copy link

Fixes #3040.

This patch series makes rustup work in the way that makes the most sense to me personally when built with self updates disabled. I've split four distinct, individually conservative changes I'd make into four patches. If you'd like me to drop or modify some of them, that's fine, of course. The first patch ("don't log on update if no-self-update is enabled but auto-self-update=disable") is the one that matters to me.

If you'd like docs or tests changes, I can do that, too, but no-self-update already doesn't seem to be covered by either. Enabling the feature causes the tests to fail even without these patches.

@rbtcollins
Copy link
Contributor

I'd quite like to remove the no self update feature entirely.

That said, can you explain the user interaction model you are aiming for here?

@autumnontape
Copy link
Author

@rbtcollins Remove it in favor of what? Do you not want distros to package rustup?

The idea behind these patches is this:

  • rustup built with no-self-update should work the same as rustup built without it as much as possible, hence why I made it able to check for self updates but not install them.
  • rustup built with no-self-update should always warn the user when it can't achieve the same behavior as rustup built without it, and only then, so it shouldn't warn if auto-self-update is disable or check-only.

@autumnontape
Copy link
Author

If you're wondering more about how I expect the messages to be helpful to users, this is what I'm envisioning:

  1. A user installs rustup through a package manager.
  2. They run rustup update and see the message.
  3. They now understand that they can update rustup through their package manager if they didn't before, and they can follow the message's directions so they won't have to see it in the future.
  4. If they're ever led to turn auto-self-update back on, a warning reminds them that it won't work with their build of rustup.

I do think a docs change to mention that rustup won't update itself when installed through a package manager would also be nice, if people were confused enough by the docs for a message to be added to the program itself.

@kinnison
Copy link
Contributor

I think I'd like to review this when I have more brain-space. I am aware that this can be annoying (I actually use rustup via nixos on some of my systems so I'm used to seeing the message, but that doesn't mean it's entirely pleasant to keep encountering).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"self-update is disabled for this build of rustup" message on every rustup update is annoying
3 participants