microsoft / microsoft/vscode-cpptools

Temporary Directories Cleanup in 'Single File Mode'

Open
#11,378 1 comment 0 reactions 1 assignee View on GitHub

@browntarik is already working on this.

Since Aug 29, 2023.

internal Language Service more votes needed
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Issue Details:
In the 'single file mode', the functions workspace_storage_path and database_storage_path are observed to return blank strings. As a result, the get_temp_path("") function is used. When get_temp_path receives a blank string, it generates a unique GUID every single time to form a part of the resultant path. This behavior implies:

  1. Each created directory has a unique GUID, meaning they are used once and never revisited.
  2. Any data written to these uniquely generated directories remains unused in subsequent sessions.
  3. There is no existing mechanism to clear or delete these directories after their one-time use.

Potential Solutions:

  1. Integrate a mechanism to clear these directories upon application shutdown. However, this might not be fully reliable as unplanned shutdowns or crashes may prevent the cleanup.
  2. Implement a persistent tracking system (possibly on the TypeScript side) that records these unique directories. This system can then be used to clean up these directories during a subsequent session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.