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" #21550

Closed
DartBot opened this issue Nov 9, 2014 · 4 comments
Closed

Issues with "pub cache repair" #21550

DartBot opened this issue Nov 9, 2014 · 4 comments

Comments

@DartBot
Copy link

DartBot commented Nov 9, 2014

This issue was originally filed by @Scorpiion


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

@kasperl
Copy link

kasperl commented Nov 10, 2014

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

@DartBot
Copy link
Author

DartBot commented Nov 10, 2014

This comment was originally written 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 #15103 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 Nov 11, 2014

This comment was originally written 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
Copy link
Author

DartBot commented Jun 5, 2015

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

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

No branches or pull requests

3 participants