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

pub: cleaning up 'dirty' packages -- pub pristine or similiar? #5391

Closed
kevmoo opened this issue Sep 23, 2012 · 15 comments
Closed

pub: cleaning up 'dirty' packages -- pub pristine or similiar? #5391

kevmoo opened this issue Sep 23, 2012 · 15 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Sep 23, 2012

What steps will reproduce the problem?

  1. Add a 3rd-party package to a project.
  2. Use CMD-F3 in the editor to find and open a file from the imported package.
  3. Change the code.

Pub update/install: don't cleanup the changes.

I'd vote for a 'pub pristine' command or similar (see Ruby gems) to force a refresh of the contents on disk, ever if version/revision values have not changed.

@kevmoo
Copy link
Member Author

kevmoo commented Sep 23, 2012

Work around: go to ~/.pub-cache/git and 'rm -rf ...' and re-run 'pub install'

@iposva-google
Copy link
Contributor

Added Area-Pub, Triaged labels.

@munificent
Copy link
Member

Added this to the Later milestone.

@munificent
Copy link
Member

Removed Type-Defect label.
Added Type-Enhancement label.

@munificent
Copy link
Member

Issue #5941 has been merged into this issue.

@munificent
Copy link
Member

Deleting stuff out of your cache is always risky because you don't know which other apps on your machine are also depending on it.

But it would be useful to have a command that's basically "forcibly redownload this" for a package. That way it's still in your cache it's just back to the pristine version.

@kevmoo
Copy link
Member Author

kevmoo commented Nov 8, 2012

Exactly. If we want to get fancy, it'd be nice (at least w/ git) to have a pub status or similar to let me know if the associated tree is dirty

@keertip
Copy link
Contributor

keertip commented Nov 8, 2012

@bob,

Can we up the priority on this one? This would be a good one to surface in the editor, especially for Windows users, since the editor can mess up the pub cache sometimes.

@munificent
Copy link
Member

We're very tight in M2 as it is right now, but if we can get uploading and the bug list into a happy place, we can try to squeeze this in.

@munificent
Copy link
Member

Issue #7192 has been merged into this issue.

@munificent
Copy link
Member

I'm going to add --force to pub cache add, which should cover this use case.


Set owner to @munificent.
Added Started label.

@kevmoo
Copy link
Member Author

kevmoo commented Apr 9, 2014

Great feature, but I'd still argue for --force (or similar) on get/upgrade

I'd take 'pub cache pristine' which would run through all installed packages, for instance.

@munificent
Copy link
Member

Spent some time discussing this and instead of:

$ pub cache add <pkg> --force

we decided a better fit for what our users want is to forcibly redownload everything that was previously cached. So I'm going to add:

$ pub cache repair

which does just that.

@munificent
Copy link
Member

Added Fixed label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#149.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants