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

Add pallet-prune and pallet-sync commands #50

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DarwinAwardWinner
Copy link
Contributor

It turns out cask already seems to have a recursive dependency walker, so I just used that instead.
This should fix #49.

@@ -237,6 +238,32 @@ use `pallet--package-archives-copy' if USE-COPY is true."
(message "Pallet: unpacking %s" package-name)
(pallet--unpack-one package-name))))

;; Command to remove unrequested packages
(defun pallet-auto-remove-packages ()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about pallet-sync?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thoughts: for the sake of argument let's say we keep this (or Cask gives us a proxy for it), and it just uninstalls surplus packages. In that case I think pallet-prune is a good name for the function (in harmony with e.g. npm prune.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like "prune" better because "sync" doesn't tell what is being synced with what (i.e. it could just as easily do what pallet-init does).

@DarwinAwardWinner
Copy link
Contributor Author

FYI it looks like the Cask devs might want to merge this into Cask, so we should probably hold off until they make a decision: cask/cask#320 (comment)

@rdallasgray
Copy link
Owner

OK, sure. I think there might still be a use case for a pallet-sync command, though, which could use the Cask (or Pallet) functionality to both install missing packages and uninstall surplus ones. But I'll leave this for now.

@DarwinAwardWinner
Copy link
Contributor Author

It turns out pallet-sync is just 2 lines.

@DarwinAwardWinner DarwinAwardWinner changed the title Add pallet-auto-remove-packages command Add pallet-prune and pallet-sync commands Nov 24, 2015
@rdallasgray
Copy link
Owner

Ryan, given cask/cask#320 (comment), are we parking this for now?

@DarwinAwardWinner
Copy link
Contributor Author

Well, if you want to, you could merge it for now with a note to update it later to use the cask functionality when it becomes available, but otherwise, yes, I'd say shelve it.

@rdallasgray
Copy link
Owner

Hey I'm finally getting some time to look at Pallet issues ... are you still interested in this functionality? If so would you be happy to write tests and document the feature?

@DarwinAwardWinner
Copy link
Contributor Author

My current Emacs config isn't using Pallet any more, so I no longer have a personal stake in this. But I'm willing to do at least some work to properly test and document it if you think it's a useful feature.

@DarwinAwardWinner
Copy link
Contributor Author

It might still be worth the effort of getting this functionality into Cask itself, as I suggested in the linked issue. But I don't know if I'll have the time to do that. And I haven't kept up with recent Cask development, so maybe something similar has already been implemented since then.

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

Successfully merging this pull request may close these issues.

Synchronizing installed packages across machines?
2 participants