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

add tip when packages are marked as upgradable #3707

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

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Nov 27, 2023

This comes up quite frequently so perhaps it needs more docs in situ.

It's quite verbose, but only shows on st --outdated, which seems to be the place the confusion usually lands.

Screenshot 2023-11-27 at 12 22 28 PM

if outdated && !no_packages_upgradable
printpkgstyle(io, :Info, """
If a package is marked by $upgradable_indicator but not upgrading, the resolver may \
have other less optimal solutions that do so.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resolver may have other less optimal solutions that do so.

I don't really understand what this means.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: "If a package is marked by $upgradable_indicator but not upgrading, it was likely restricted by a secondary dependency" (right? isn't that the only case where this would show up?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it could be that the resolver has multiple solutions, but the one it went for was the one that changed the least. In that case force adding a version should work but downgrade more

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that due to the preserve argument defaulting to all?

You can try the following (in recommended order):
- setting compat for the package at the desired version and running `update` again.
- forcing by `add Foo@(version)`, but a following `upgrade` may downgrade again.
- forcing by `pin Foo@(version)`. Pinning avoids downgrade but may be too inflexible to maintain.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but may be too inflexible to maintain.

Same here, not sure what this means.

Copy link
Contributor

@BioTurboNick BioTurboNick Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions:

To upgrade this package, you can try one of the following (in recommended order):
              - Add compat entry with `compat (Package) (version)` for the package at the desired version and run `update` again.
              - Temporarily force the new version with `add Foo@(version)`, but a future `upgrade` may revert it.
              - Permanently force the version with `pin Foo@(version)`, but you will need to manually change this to upgrade in the future.

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.

3 participants