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

Pkg: provide hooks for Pkg.update() to packages #4201

Closed
staticfloat opened this issue Sep 3, 2013 · 8 comments · Fixed by #5783
Closed

Pkg: provide hooks for Pkg.update() to packages #4201

staticfloat opened this issue Sep 3, 2013 · 8 comments · Fixed by #5783
Assignees
Labels
packages Package management and loading
Milestone

Comments

@staticfloat
Copy link
Sponsor Member

It would be neat if packages could register a callback for when the user does Pkg.update(). This would be a really nice solution for packages that might internally have some state that they could update (such as the formulae in the tap of my Homebrew.jl package).

As it stands, right now there is a Homebrew.update() function which isn't terrible, but as we get more and more packages, it would be nice to have Pkg.update() be able to apply to all the packages that might have such functions. I have a dummy deps/build.jl file which is just:

using Homebrew
Homebrew.update()

But this only gets triggered on an SHA bump of Homebrew.jl, which will likely happen far less often than I will add new formulae into homebrew-juliadeps.

@Keno
Copy link
Member

Keno commented Sep 15, 2013

Maybe we should allow packages to put an update.jl file into their deps directory.

@staticfloat
Copy link
Sponsor Member Author

That sounds good to me. Especially as it keeps things lightweight; we don't necessarily have to pull in the entire package for parsing just to update it.

@StefanKarpinski
Copy link
Sponsor Member

We should go ahead with this. Where does the call to deps/update.jl need to go?

@staticfloat
Copy link
Sponsor Member Author

I would do it just after a successful Pkg.update().

@staticfloat
Copy link
Sponsor Member Author

Is this getting put into 0.2? Or 0.3?

@StefanKarpinski
Copy link
Sponsor Member

I think it could probably go into 0.2.

@jiahao
Copy link
Member

jiahao commented Oct 26, 2013

Marking as 0.2.x - bonus if it makes it to 0.2 release

@staticfloat
Copy link
Sponsor Member Author

I've marked this as 0.3, since it's a new feature.

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

Successfully merging a pull request may close this issue.

4 participants