-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cache dependencies during install macro #63
Conversation
Almost. If the cache is stale this should automatically rerun. |
Do you mean if the library path is not found at runtime? In that case, I would prefer to error out and suggest running Pkg.build again. The check can be put in the putative Pkg macro so that there is no runtime dependency on BinDeps. |
The problem with that is that if you do using FooBar again, it will On Saturday, October 19, 2013, Isaiah wrote:
|
I see, but that seems like a more general problem. Maybe we ought to have a way to abort module loading. |
Yes, backing out of loading is a more general problem: JuliaLang/julia#3648 This change is still an improvement, since it makes the common case behave well, and pushes the badness to a case where something is already wrong. |
Also, my objection to running a build automatically is that this is not what I asked the program to do. |
It's not running a build. It's finding the library which you did ask the
|
If I order a steak and the restaurant is sold out, I expect to be told "we have no more steak". I don't expect to be clubbed over the head or drugged for several hours while someone goes and finds another cow. I am really, really grateful for the fact that you want things to just work, but I think that this is a step too far: triggering remote XML and RPM downloads as a consequence of |
That's a problem with RPMmd though. |
What do you think RPMmd should do differently? |
Not update it's xml just because we're querying for a package. |
I also would like to have this as part of the |
...and we've come full-circle. Frankly I don't care, but you'll have to convince @vtjnash yourself.
I started with that, but load_dep is recursive, and moreover I don't see the point because at the end of the day this also just calls |
No, you should not have to load bindeps at all just to use another package
|
Fine, but I object to having a BinDeps-specific macro in |
One can have a standard for where/how things are installed, with BinDeps as
|
Yes, but having a cache file for the search path of libraries strikes me as an implementation detail. |
Not really; it's not much different from having both the FHS and a distro install tool that puts files in those places. One can say things like "package X uses the BinDeps standard", which does not in any way imply loading the full BinDeps package on every use of package X. The way it is now, a package has to both load BinDeps and use a BinDeps-specific incantation to load its libraries. That is some pretty strong coupling. This change is in fact a step towards looser coupling. The cache file is very simple, and could be written and consumed by other tools, or written by hand. I can already imagine solving install problems by editing this file, which is certainly not preferred but it's a nice escape hatch to have. |
+1 |
Please let me know if there is something I should do to improve this PR. It would be nice to have more reasonable load times before releasing 0.2. |
Alright, since I seem to have been overruled on the BinDeps runtime thing, let's put some nice error messages in here (telling you to do Pkg.build on the package you wanted to load (to make sure all dependencies are built) and then restart julia). After that I will merge this, but I reserve the right to come up with a different solution. |
I'm fine with any solution that's at least as efficient as the one here. |
Updated. Now writes (to
|
Cache dependencies during install macro
Good. How do we get packages using this? Can we just replace calls to |
That, and move the lib mapping from |
Great, thanks. Since we typically only hear the bad news, I'll share some good news: I was on a new ubuntu machine today, wanted to plot something, and typed |
Amazing! Seriously, that is great. |
New usage:
Writes (to
deps/deps.jl
), e.g.: