-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: store results of Pkg.build and behave more intuitively on broken packages #11262
Comments
First, as I wrote in #7054, whole |
I'm not suggesting running Common example scenario: user runs |
It would be more intuitive to suggest a user to build the package agian with |
We already do suggest that. And yet this still confuses people. If the definition of insanity is trying the same thing twice and expecting different results, then (I'm being facetious of course, but this is confusing if you don't understand what's going on under the covers. The main proposal on the add/build side is that resolve should call build not only on the changed set of packages, but also on any existing not-yet-successfully-built packages.) |
The problem is in a package definition of a dependency. A package has REQUIRE dependencies and other "strange" dependency mechanism through "deps\build.jl" file. The latter is completely separated from the package management. ( I mean from a package description. It is just a file is specific folder.) And then a We need either to bring some standard to |
I think that external libraries that are currently build in |
@StefanKarpinski, that's basically how WinRPM and Homebrew.jl work. |
I didn't want to bring up the "BinDeps needs a rewrite" discussion here, sure that's a large part of the problem but out of scope for this issue. Given that the problem BinDeps is trying to solve is a hard one, and it fails often right now, I'm proposing relatively minor changes to try to make what |
We could have a broader discussion about whether Even if we refactored so that a "SourceBuilds.jl" package centralized the locations of where other packages built to, a la WinRPM.jl and Homebrew.jl, things wouldn't be any less likely to fail in various ways. Right now when WinRPM.jl or Homebrew.jl go wrong, it usually needs me or Elliot or someone else who's seen the problem before to translate what the problem is and what the solution might be. And that can only happen if the person was patient enough to open an issue about the problem instead of just giving up immediately. |
I got a little rant-y here, sorry for the word count. I'd appreciate feedback on the core proposal, to store results of |
I think it's quite reasonable. The current problem is that if people don't take red text seriously during the initial install, they never get a reminder that something is broken. |
+1 to @tkelman's proposal. It's particularly confusing to have packages that are supposed to be installed, but are not built. A higher standardization of dependency installation is also a good idea, but much beyond the scope of this issue. |
👍 also on this proposal |
I have my doubts about not using |
I agree with this. Many times when there are multiple packages to install (typically with a new installation of Julia) there are multiple pages with red text and it is hard to get an overview. |
The problem with so many configure scripts is there are non-errors that result in automatic disabling of optional features, which are often important. Logging the output by default is a good idea since it means there are standard files you can upload (like |
I'm going to close this for now. #12350 should hopefully help if it or something like it gets merged. Otherwise the "adding more state" is probably something that needs to be fixed within BinDeps, or a replacement thereof. It's really the source of almost all of the problems here, as @wildart said. There are a handful of packages that use Eventually we'll need to do something like #11955, and declarative build (or binary install, following the conda or R examples) instructions, rather than arbitrary code execution, should likely fit into that somehow. |
Pkg has some implementation issues (being worked on in #11196) and some usability issues. I recall seeing someone vent about a number of these non-intuitive behaviors recently, but can't remember whether it was on github or the mailing list or HN or reddit, sorry.
A big trouble spot in the process of installing packages is when you first run
Pkg.add
on some complicated package that has binary dependencies, andPkg.build
(which runs automatically when you first doPkg.add
) fails for one reason or another. It's not immediately obvious thatPkg.build
is a separate thing that you have to run manually from then on, until someone asks for help and we tell them that. Trying to runPkg.add
a second time (which is the intuitive thing most people will probably try first) doesn't triggerPkg.build
, it's typically going to be a no-op.Another issue is #7054. In response to trying
Pkg.add
a second time and that not working, the next step people will probably try isPkg.rm
. ButPkg.rm
is misleadingly named, it isn't really a remove operation, instead it moves the package to the hidden.trash
folder. Again, not intuitive.So, I have a proposal for trying to make this better. We should save (somewhere, somehow, in some format, not getting too picky on the implementation details just yet) the results of whether the most recent call to
Pkg.build
succeeded or failed, for all installed packages. For pure-Julia packages that don't have adeps/build.jl
file, treat this as always succeeding. When an installed package is in a broken state, I think callingPkg.add
orPkg.rm
on it (reallyPkg.resolve
, but most users don't see that) should behave differently -Pkg.add
should automatically runPkg.build
again until it has succeeded, andPkg.rm
should just delete the package instead of sending it to.trash
since it's unlikely we want to re-use the broken state.tl;dr: RFC on title- good idea, bad idea? Can get into implementation questions and start working towards a PR if the idea is popular.
The text was updated successfully, but these errors were encountered: