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

Issues with "pub cache repair" #1188

Closed
DartBot opened this issue Jun 5, 2015 · 4 comments
Closed

Issues with "pub cache repair" #1188

DartBot opened this issue Jun 5, 2015 · 4 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1047298?v=3" align="left" width="96" height="96"hspace="10"> Issue by Scorpiion
Originally opened as dart-lang/sdk#21550


In a thread on Google Plus there was a discussion of issues with "pub cache repair", this is an issue to track that discussion. Further discussion on the subject is better held here than on Google Plus.

Thread:
https://plus.google.com/113415344870093527255/posts/Tab8xQnqoFs

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2156198?v=3" align="left" width="48" height="48"hspace="10"> Comment by kasperl


cc @munificent.
Added Area-Pub, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1937607?v=3" align="left" width="48" height="48"hspace="10"> Comment by denniskaselow


I think my use case for needing to run "pub cache repair" is more of a non-issue that will go away once issue #727 is fixed, but I'll add some detail anyway.

Have two branches: one with the development version (e.g. the example webapp), one with the deployable version (everything that's in build/web after running 'pub build').

The development version has symlinks to the required packages, and the packages-dirs are in .gitignore
The deployable version has no symlinks, but a real packages-dir which is not ignored.

Switching from development to deployable the directories in packages remain symlinked, but will now contain what's checked into the deployable branch (e.g. the browser-package with dart.js). Switching back to the development version will now remove the browser-package/content and thus delete the content of the symlinked folder.
=> pub cache ruined for this dependency

By doing this step by step, documenting everything I was even able to ruin it even more, because windows locked the browser folder and pub cache repair failed on its first try and didn't seem to try again on later tries...

On the first try:
Failed to repair browser 0.10.0+2. Error:
Failed to delete entry because it was in use by another process.
This may be caused by a virus scanner or having a file
in the directory open in another application.

Further tries didn't even mention this dependency. Only the files in the lib folder were missing. Had to delete the browser-0.10.0+2 folder myself and run pub get on my project again.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/719048?v=3" align="left" width="48" height="48"hspace="10"> Comment by paulevans


For what it is worth it manifested itself for me as a previous get did an incomplete fetch. Then subsequent gets did not fill in the missing files. pub cache repair forced it to re download what was missing.

Something similar also just happened on our integration server - both times it was files missing from the intl package. I expect that is just a coincidence though.

@DartBot DartBot added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 5, 2015
@nex3
Copy link
Member

nex3 commented Dec 9, 2015

There have been some major improvements to pub cache repair since this was filed, so I'm going to consider it fixed. If anyone has further issues with it, please feel free to file a new issue.

@nex3 nex3 closed this as completed Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants