flutter / flutter/devtools

Flutter Devtools create file in my $HOME and don't allow for relocation

Đang mở
#7,370 7 bình luận 1 reaction 0 người được giao Xem trên GitHub
P3 server
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

In my home directory the following directory is created whenever I use devtools:

```
$ tree -a ~/.flutter-devtools
/Users/bartek/.flutter-devtools
└── .devtools
```

Content of that single file is:

```
$ cat ~/.flutter-devtools/.devtools
{
"analyticsEnabled": true,
"isFirstRun": false,
"lastReleaseNotesVersion": "2.31.0",
"2023-Q4": {
"surveyActionTaken": false,
"surveyShownCount": 0
}
}
```

I don't like when programs clutter my personal `~`. I very much echo sentiment of [this article](https://0x46.net/thoughts/2019/02/01/dotfile-madness). Unfortunately it looks like the location of that file is currently hardcoded ([example](https://github.com/flutter/devtools/blob/8a528c6d6575df48cdde795af82863b7b1b4d26d/packages/devtools_shared/lib/src/server/file_system.dart#L20-L23)).

Therefore I'd like for Flutter DevTools to respect [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), so that the `.devtools` file could be stored in (e.g.) `~/.local/state`, that is, `$XDG_STATE_HOME`.

To support migration, Flutter Devtools would continue to use `~/.flutter-devtools/.devtools` if it exists. If it does not exist, it should default to the appropriate XDG base directory.

I am willing to contribute this feature, if only the maintainers of this project agree with this suggestion.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.