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

.dart and .dartServer is stored in home folder on macOS #49166

Open
probablykasper opened this issue Jun 2, 2022 · 8 comments
Open

.dart and .dartServer is stored in home folder on macOS #49166

probablykasper opened this issue Jun 2, 2022 · 8 comments
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. os-osx P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@probablykasper
Copy link

On macOS, Dart stores data in the unconventional folders ~/.dart and ~/.dartServer. This contributes to a mess where app files are scattered everywhere, the home folder is cluttered, and backups get filled with unnecessary junk.

This should be fixed and moved to proper paths, like ~/Library/Application Support, ~/Library/Caches and ~/Library/Preferences.

  • Dart SDK version: 2.17.1 (stable) (Tue May 17 17:58:21 2022 +0000) on "macos_x64"
  • macOS 10.15
@lrhn lrhn added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. os-osx labels Jun 2, 2022
@lrhn
Copy link
Member

lrhn commented Jun 2, 2022

Not sure who uses .dart, but .dartServer sounds like the analysis server.

@probablykasper
Copy link
Author

.dart seems to be for user-level settings. If .dartServer is for the analysis server, is there a different repo this should be reported in?

@bwilkerson
Copy link
Member

Yes, .dartServer is from the analysis server, and this repo is the right place for reporting the issue.

There's a larger conversation happening about unifying all of our tools and cleaning up where we're putting temporary files. Unfortunately, I don't remember who's leading that effort.

@bwilkerson
Copy link
Member

@mit-mit Do you remember where this was recently discussed?

Assigning p3 until I can figure out what the larger plan is.

@bwilkerson bwilkerson added the P3 A lower priority bug or feature request label Jun 10, 2022
@mit-mit
Copy link
Member

mit-mit commented Jun 14, 2022

I think there was some discussion about this for pub, @jonasfj ?

I think we might be able to create a package with FFI for determining the canonical folders for each host OS?

@jonasfj
Copy link
Member

jonasfj commented Aug 23, 2022

See: #41560 (comment)

But that's really only for configuration.

There is XDG specification details for where to put cache folders. So if we want .dartServer to live somewhere else we should probably add a applicationCacheHome() to cli_util similar to how I added applicationConfigHome in dart-lang/cli_util#66

@derolf
Copy link

derolf commented Jan 16, 2023

In your .zshrc, add:

export ANALYZER_STATE_LOCATION_OVERRIDE=$HOME/Library/Caches/dart_server

cf.

/// Generally this is ~/.dartServer. It can be overridden via the
/// ANALYZER_STATE_LOCATION_OVERRIDE environment variable, in which case this
/// method will return the contents of that environment variable.

4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Dec 15, 2023
4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Dec 15, 2023
This should be used to eventually fix dart-lang/sdk#41560.

See dart-lang/sdk#49166 (comment)

Test plan:
```
$ dart test
00:00 +4: All tests passed!
```
run `dart doc` and inspect docs for correctness.
4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Dec 15, 2023
This should be used to eventually fix dart-lang/sdk#41560.

See dart-lang/sdk#49166 (comment)

Test plan:
```
$ dart test
00:01 +16: All tests passed!
```
run `dart doc` and inspect docs for correctness.
4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Dec 15, 2023
This should be used to eventually fix dart-lang/sdk#41560.

See dart-lang/sdk#49166 (comment)

Test plan:
```
$ dart test
00:01 +16: All tests passed!
```
run `dart doc` and inspect docs for correctness.
4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Dec 15, 2023
This should be used to eventually fix dart-lang/sdk#41560.

See dart-lang/sdk#49166 (comment)

Test plan:
```
$ dart test
00:01 +16: All tests passed!
```
run `dart doc` and inspect docs for correctness.
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 14, 2024
@bartekpacia
Copy link

related #42813

4e554c4c added a commit to 4e554c4c/dart_cli_util that referenced this issue Jun 29, 2024
This should be used to eventually fix dart-lang/sdk#41560.

See dart-lang/sdk#49166 (comment)

Test plan:
```
$ dart test
00:01 +16: All tests passed!
```
run `dart doc` and inspect docs for correctness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. os-osx P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

8 participants