-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Issue with Dart pub cache since 3.0 launch on windows #52386
Comments
There are two changes here:
The impact of (B) is merely that the user have to sign-in again. An annoyance, but keeping credentials out of the I don't think we've considered all the impacts of (A). Especially, not around I think (A) should affect users who have been using Dart since before 2.8, but that's also a sizable number of people.
Hmm, I suppose a warning message that encouraged users to delete the old folder would be fairly harmless. |
Filed https://dart-review.googlesource.com/c/sdk/+/303321 to update the |
I'm not sure (A) is something we should revert. I could be convinced, but I think that moving the PUB_CACHE to It probably won't affect most users, but if you are using school or corporate system where We could do a notice message encourage users to delete the old pub-cache. That would help users reclaim some disk space :D |
Rather than reverting -- which would out is back mid-stream with two different cache locations -- I suggest we implement the suggested warning message that encourages users to delete the old folder, and update path + then cherry pick that. |
See: #52386 Change-Id: I48149aeeea5a78ea2c1d9d7b3b9df8d48ed2310e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303321 Reviewed-by: Alexander Thomas <[email protected]> Auto-Submit: Jonas Jensen <[email protected]> Commit-Queue: Jonas Jensen <[email protected]>
Context: dart-lang/sdk#52386 --------- Co-authored-by: Anthony Sansone <[email protected]> Co-authored-by: Parker Lougheed <[email protected]>
Bump pub to fe6acca8f5a6e48b7da862038e60db68d26e01b2 Changes: ``` > git log --format="%C(auto) %h %s" 3a7dc04..fe6acca https://dart.googlesource.com/pub.git/+/fe6acca8 Warn about presence of legacy cache (3921) ``` Diff: https://dart.googlesource.com/pub.git/+/3a7dc04eda4e7c359aed35176658bb2acc264f2e..fe6acca8f5a6e48b7da862038e60db68d26e01b2/ Bug: #52386 Change-Id: I9ba86cbe7e7336bb5db049a7f647e8d81391e681 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305981 Commit-Queue: Sigurd Meldgaard <[email protected]> Reviewed-by: Jonas Jensen <[email protected]>
Context: dart-lang/sdk#52386 --------- Co-authored-by: Anthony Sansone <[email protected]> Co-authored-by: Parker Lougheed <[email protected]>
TLDR; Pub changed its cache directory location on Windows and did not move the data or update the PATH and warn the user.
Example:
This is usual behaviour with pub global binaries after upgrade of Dart as the snapshot kernel format for the compiled Dart code has changed. It then recompiles the snapshot and all is well.
However, even after the normal recompilation. The error message persists.
This is because melos re-executes itself and it's executing a previous version. This is not a melos specific issue as it also occurs with other previously installed globally activated binaries.
This is because the pub global cache directory has moved. So new binaries/scripts are being created in the new directory and not the old one. Without any warning to remove the old one from the PATH, or to have those binaries/scripts removed.
Flutter 3.7 / Dart 2.19
C:\Users\<user>\AppData\Roaming\Pub\Cache\bin
Flutter 3.10 / Dart 3.0
C:\Users\<user>\AppData\Local\Pub\Cache\bin
With the directory change without the movement of files from one to the other. I have also "lost" the pub publish credentials for packages as that remains in the old directory.
I also lost 15 GB of disk space to the old directory not being deleted, since there was no deletion policy from the upgrade. Not to mention the re-download of all of the pub packages to the new directory using up bandwith. For me this is not an issue, but for some developers in other situations where they pay for the data they download.
I have now updated my PATH and moved my credentials over and removed the old directory and all is well.
The text was updated successfully, but these errors were encountered: