-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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.rm persists (broken) state #7054
Comments
I was surprised by this in a happy way because it actually saves quite a bit of time on the PackageEvaluator runs. Keyword argument could be good. |
I think both functionalities should be available, but there's a question of naming and which should be the default. |
|
Or |
I believe when this was in Pkg1, I had named it |
How about calling it |
Will that work on windows? |
No, but as of last night we now have Edit: correction, it will work now because we are bundling msysgit. After switching to libgit it won't work. |
Bump. I think this is still very confusing and unintuitive behavior. |
I think, having |
Scenario: you've done a ton of work on package X but haven't pushed those changes anywhere. Then you remove the requirement for package Y, which happens to cause you to no longer need to have X installed – so the package manager does |
Regarding names: |
I agree with @mlubin -- The current behavior could be called |
Inform that package is "dirty" and let user decide if "force" remove package. In case of automatic change resolution, same thing should happen. |
Understanding |
I would not complicate, package manager with additional functions. I bet an average user (not a package developer) uses only: |
Exactly, user sees |
This is key. Dependency resolution is not a concept everyone has an intuitive grasp over, and it's a pretty high bar to put up to suggest people need to understand how all the internals work in order to install and remove packages. My suggestion in #11262 is to at least store the state of whether a package has built properly, and not bother keeping broken packages around when they're removed. The state of whether there have been local modifications made could also be worth looking at, to address the loss-of-work concern. The much more common use case is a frustrated new user wanting to start over from scratch and try again, but the way things are set up right now requires jumping through some very non-obvious hoops and learning a lot of new things at once to do that properly. I don't usually say this about most things in the language, but for |
I agree; it's so frustrating that |
I also like the name |
I agree that I suggest something like
What do you think ? |
you'd need a git clean in there somewhere to remove uncommitted work or things like files downloaded by bindeps, which is often the cause of this issue |
Yes that is what I meant by |
an issue is that you need |
It even seems that I need |
Agree that having
This is all consistent with the behavior of the aptitude package manager (and similar ones like fink). |
I still think |
The proposed change as implemented in #7054 will never see the light of day since it's more than a bugfix so it can't be in 0.6.x and the current package manager will be fully replaced in 0.7/1.0. If there's a pure bugfix change that can be done here, that would be a good 0.6 PR to make, but otherwise I'm inclined to close this as "won't fix". |
It has occurred a number of times that, say,
Pkg.build()
fails for some reason and the package gets into a broken state, where anotherPkg.build()
isn't sufficient to fix it (BinDeps scripts aren't perfect). The user's response is typically (and reasonably) to doPkg.rm("foo"); Pkg.add("foo")
, which surprisingly does absolutely nothing because the old version is just copied to and from.trash
Could we have an interface in
Pkg
to completely delete or reset the state of a package? Also, isPkg.rm
a reasonable name for moving a package directory to the recycle bin? It seems surprising for anyone who knows what unixrm
does.The text was updated successfully, but these errors were encountered: