-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Adhere to XDG base directory spec #53312
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at: https://dart-review.googlesource.com/c/sdk/+/322300 Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly. Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR). |
/cc @srawlins @bwilkerson |
Please add custom location support for both folders. |
I'm not suggesting anything. Just linking issues. |
Is there anything I need to change to have this PR merged? |
Lemme review with the team. Not sure of any consequences of moving this directory between releases. |
Ping? |
@srawlins is this on your plate now? |
Ah sorry, missed the ping during the conference. Will discuss this morning in a team meeting. |
Sorry for the delay in pointing this out, but as copybara-service points out above, the code review is done at https://dart-review.googlesource.com/c/sdk/+/322300, and there are some unresolved comments there. Please look at those and upload a new commit if you make changes in response to the comments. |
XDG actually specifies a few override environment variables, which might be interesting or important here:
This change could be an opportunity to use I think not necessary for this PR, but it would be good to address this while it's paged into our brains. |
Yeah, agree with @srawlins. Most people use XDG to keep clutter out of their
So for example, just now when I installed Note also that people do use XDG on MacOS (me, for one, on my work laptop) so we probably shouldn't assume it's a Linux-only phenomenon. |
If it's helpful (and mostly for selfish reasons, so I get to clean up my |
Actually, sorry to say this, but I think in order to minimize any intermediate locations, we should switch from We chatted internally, and we'd like to provide a mechanism that slowly cleans up the data in the old location, using an existing mechanism: there is code that slowly removes old cache entries, and we can use that to remove the data in CC @DanTup @scheglov would you say everything in I think all I'm asking for then is to change pkg/analyzer/lib/file_system/physical_file_system.dart to use |
If it's analytics data, I'd argue it belongs in |
That sounds fair.
True. But we want to be careful not to blow away these directories with abandon. For example, one design might be to delete the |
Here's what I have in this folder (
There's also some Dart-related stuff in (note: Roaming, not Local):
These both seem telemetry related, but I'm not sure who is writing them (I suspect the new unified analytics package is doing at least one of them). I'm not sure how these two different Windows paths (Local AppData vs RoamingAppData) map on to Mac/Linux (I suspect they're merging into the home dir?). |
Yes, it's just cache and we use the analyzer's API to get the location. And yes, the same bytestore is used so |
@eliasyishak Could you look at the #53312 (comment) for the telemetry question? |
Yes, the |
@srawlins friendly ping. |
Thanks for the ping, @mraleph . Closing. OP has not reponded since I asked on Oct 19 to respond to code review comments. @SingularisArt feel free to re-open. |
I moved the default configuration directory from
~/.dart
and~/.dartServer
to:~/.config/dart
and~/.config/dartServer
.~/Library/Application Support/dart/
.%APPDATA%/dart/
You can overwrite the
~/.config/dart
path with theDART_CONFIG_DIR
variable.I believe this resolves #41560 for the most part.