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

--outdated flag to status #2284

Merged
merged 4 commits into from
Aug 16, 2021
Merged

--outdated flag to status #2284

merged 4 commits into from
Aug 16, 2021

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Dec 9, 2020

bild

@StefanKarpinski
Copy link
Sponsor Member

What about showing a limited form of this by default? Like HTTP v0.8.19 (< v0.9.1)?

@brenhinkeller
Copy link
Sponsor

I'll put in a word for displaying the full names of each package causing a hold back (as in the screenshot) -- this would hugely decrease the barrier of entry for folks that aren't experts in the nuances of Pkg to see what is holding back what, and maybe even go make some PRs to help fix the holdouts.

@StefanKarpinski
Copy link
Sponsor Member

That seems like way too much information to put in the default status output.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jan 23, 2021

Something like this for Pkg.update seems excellent, though I think the current state of the PR output is confusing. My suggestion would be to mark them more kindly (without an x), and in the message, tell the user how to get the more detailed output.

...
[abcdefg] Example v1.1 ([yellow]v2.9 available[/yellow])
...
Info Some packages are not at the highest released version. Call `Pkg.upgradable()` for additional information.

@KristofferC
Copy link
Sponsor Member Author

My suggestion would be to mark them more kindly (without an x), and in the message, tell the user how to get the more detailed output.

This is with a -c to status so the output here is pretty much what Pkg.upgradable() would show.

I am not sure having ([yellow]v2.9 available[/yellow]) in the default status output is a good idea.

@KristofferC
Copy link
Sponsor Member Author

I've gotten around to showing something by default in the normal status update. I'll work on how it would look and update here.

@KristofferC
Copy link
Sponsor Member Author

I updated this. Still need to fix tests etc. The way it works now is that if you give the --compat flag it filters out things to only show packages that are not on the latest version:

(Pkg) pkg> st
Project Pkg v1.8.0
Status `~/JuliaPkgs/Pkg.jl/Project.toml`
 [a8cc5b0e] Crayons v3.0.0
 [28b8d3ca] GR v0.57.5
 [5c1252a2] GeometryBasics v0.3.13
...

(Pkg) pkg> st -c
Project Pkg v1.8.0
Status `~/JuliaPkgs/Pkg.jl/Project.toml`
 [28b8d3ca] GR v0.57.5 (<0.58.1): Plots
 [5c1252a2] GeometryBasics v0.3.13 (<0.4.1): Plots
 [91a5bcdd] Plots v1.15.3 (<1.20.0)

Also, Crayons here is not the latest version but it is the latest version according to our own specific compact (I added Crayons = "4" to the Pkg Project.toml file). If you want to ignore that you can do:

(Pkg) pkg> st -c --ignore-project-compat
Project Pkg v1.8.0
Status `~/JuliaPkgs/Pkg.jl/Project.toml` 
 [a8cc5b0e] Crayons v3.0.0 (<4.0.4) # <-------------- now visible
 [28b8d3ca] GR v0.57.5 (<0.58.1): Plots
 [5c1252a2] GeometryBasics v0.3.13 (<0.4.1): Plots
 [91a5bcdd] Plots v1.15.3 (<1.20.0)

I think it would be good to get this in before deciding on what exactly to show in the default status output because then people can play with it and based on that experience the default status can be tweaked.

@IanButterworth
Copy link
Sponsor Member

I gave this a bit of a go.

if you give the --compat flag it filters out things to only show packages that are not on the latest version

To me the word "--compat" doesn't lend itself to that behavior. Perhaps "--heldback"? of if staying with --compat perhaps show all, not just those being held back.

Also, perhaps it should indicate when the package is held back by an explicit [compat] entry, and use the same language as the resolver to tie the concepts together.

@KristofferC
Copy link
Sponsor Member Author

KristofferC commented Aug 9, 2021

Thanks for the comment.

Regarding showing all packages, and just have a note for those that are upper bounded, I tried that first but it was kind of noisy and for big environments, you were mostly scrolling around trying to find the upper-bounded packages.
How about the following:

(Pkg) pkg> st -c
Project Pkg v1.8.0
Status `~/JuliaPkgs/Pkg.jl/Project.toml`
 [a8cc5b0e] Crayons v3.0.0 (<4.0.4) [compat]
 [28b8d3ca] GR v0.57.5 (<0.58.1): Plots

This shows that Crayons is upper bounded to 3.0.0 due to project compat. GR is upper bounded to 0.57.5 due to Plots etc.

(Pkg) pkg> add Crayons@2
...

(Pkg) pkg> st -c
Project Pkg v1.8.0
Status `~/JuliaPkgs/Pkg.jl/Project.toml`
 [a8cc5b0e] Crayons v2.0.0 [<3.0.0], (<4.0.4)
 [28b8d3ca] GR v0.57.5 (<0.58.1): Plots
 [5c1252a2] GeometryBasics v0.3.13 (<0.4.1): Plots
 [91a5bcdd] Plots v1.15.3 (<1.20.0)

Here we see that Crayons is upper bounded to 2.0.0 and the max version from compat is 3.0.0 and the max total version is 4.0.4 (shown in yellow).

@KristofferC KristofferC force-pushed the kc/compat_status branch 4 times, most recently from c42f6b0 to 5d5f1fa Compare August 9, 2021 11:50
@StefanKarpinski
Copy link
Sponsor Member

Brainstorming option names: --capped, --conflicts, --old?

@IanButterworth
Copy link
Sponsor Member

What about --latest and group by whether they're on latest or not?

On latest release
...
Not on latest release
...

@KristofferC
Copy link
Sponsor Member Author

KristofferC commented Aug 9, 2021

What I liked with compat was that it kind of shows the effect that the compat section of the packages has on the versions in your environment. If there was no compat in any package, everything would be on the latest version, with compat you have packages that might be on lower version and this option gives you the packages that have added compat as to make that happen.

What about --latest and group by whether they're on latest or not?

When you use this option, from my experience with playing around with it, you don't really care about packages that are on the latest version.

@IanButterworth
Copy link
Sponsor Member

Yeah ok. I guess I was thinking about it from the perspective of #2682 but that issue seems to need a separate solution that's more about latest.

@KristofferC KristofferC force-pushed the kc/compat_status branch 2 times, most recently from effe5ef to 1675cfe Compare August 10, 2021 15:05
@KristofferC
Copy link
Sponsor Member Author

Another thing, you could also be restricted by Julia compat. I don't think this is taken into account right now in this code. Gonna have to test it.

@martinholters
Copy link
Member

--outdated?

@StefanKarpinski
Copy link
Sponsor Member

That does seem like a good name for this option 👍🏻

@KristofferC
Copy link
Sponsor Member Author

Yep, let's go with that

@KristofferC KristofferC changed the title wip --compat flag to status wip: --outdated flag to status Aug 13, 2021
@KristofferC KristofferC merged commit b2ced4b into master Aug 16, 2021
@KristofferC KristofferC deleted the kc/compat_status branch August 16, 2021 07:37
IanButterworth added a commit to IanButterworth/Pkg.jl that referenced this pull request Aug 19, 2021
IanButterworth added a commit to IanButterworth/Pkg.jl that referenced this pull request Aug 19, 2021
@KristofferC KristofferC changed the title wip: --outdated flag to status --outdated flag to status Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants