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

More verbose Pkg.update() for checked out packages #11875

Closed
wants to merge 1 commit into from

Conversation

mbauman
Copy link
Sponsor Member

@mbauman mbauman commented Jun 26, 2015

Just like how "free" packages display which versions they're updating from and to, display the git SHA for checked out packages as they are updated. Here's a real-life example:

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating Interpolations master...
INFO: Updating Tuples master...
INFO: Skipping TerminalExtensions (dirty)...
INFO: Updating AxisArrays master...
INFO: Updating Compat master...
INFO: Updating IntSets master...
INFO: Updating HDF5 master...
INFO: Skipping BitSets (dirty)...
INFO: Updating DataArrays master... b5d39c3 => c588781
INFO: Skipping Signals (dirty)...
INFO: Updating KDTrees master...
INFO: Updating FileIO master...
INFO: Skipping SmallDicts (dirty)...
INFO: Updating BinDeps master...
INFO: Updating DataFrames master...
INFO: Updating SIUnits master...
INFO: Updating Homebrew master...
INFO: Computing changes...
INFO: No packages to install, update or remove

To be honest, I was totally unaware of how many packages I had that were either dirty or happened to be on a custom branch before I made this change (DataArrays is only updating because I had been on a custom branch until I started printing out the branch names). This also prints out the before and after SHA if there was a change.

It's a small change, but I have no idea how the Pkg code works, so I'd appreciate a slightly more-thorough-than-usual lookover. In particular, I don't know if these git commands are available for our lowest-supported Git version, or what the @recover macro does.

Just like how "free" packages display which versions they're updating from and to, display the git SHA for checked out packages as they are updated.  Here's a real-life example:

```txt
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating Interpolations master...
INFO: Updating Tuples master...
INFO: Skipping TerminalExtensions (dirty)...
INFO: Updating AxisArrays master...
INFO: Updating Compat master...
INFO: Updating IntSets master...
INFO: Updating HDF5 master...
INFO: Skipping BitSets (dirty)...
INFO: Updating DataArrays master... b5d39c3 => c588781
INFO: Skipping Signals (dirty)...
INFO: Updating KDTrees master...
INFO: Updating FileIO master...
INFO: Skipping SmallDicts (dirty)...
INFO: Updating BinDeps master...
INFO: Updating DataFrames master...
INFO: Updating SIUnits master...
INFO: Updating Homebrew master...
INFO: Computing changes...
INFO: No packages to install, update or remove
```

To be honest, I was totally unaware of how many packages I had that were either dirty or happened to be on a custom branch before I made this change (DataArrays is only updating because I had been on a custom branch until I started printing out the branch names).  This also prints out the before and after SHA if there was a change.
@tkelman tkelman added the domain:packages Package management and loading label Jun 26, 2015
@wildart
Copy link
Member

wildart commented Jun 26, 2015

This will slow down update even more. With libgit2 backend it would be faster. I think we should postpone it. Meanwhile, you could look at Pkg.status before doing update.

@tkelman
Copy link
Contributor

tkelman commented Jun 27, 2015

Can we measure how much slower? I think this is valuable information, and Pkg.status is itself really slow.

@mbauman
Copy link
Sponsor Member Author

mbauman commented Jun 27, 2015

INFO: Skipping Pkg (dirty)… is free. But getting the branch information and pre/post SHAs involves adding three git calls per package to the existing two. As I understand it the majority of the time for the slower platforms is in startup of git. So this could be up to 2.5x slower per checked-out package.

@jakebolewski
Copy link
Member

closing in favor of #13648

@mbauman mbauman deleted the mb/verboseupdate branch October 16, 2015 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants