Skip to content

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

@bartekpacia

Description

@bartekpacia

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. Unfortunately it looks like the location of that file is currently hardcoded (example).

Therefore I'd like for Flutter DevTools to respect XDG Base Directory Specification, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3issues we think are valid but not importantserver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions