Skip to content

#2174: store VSCode user-data under $IDE_HOME/.ide/vscode/<workspace>/config#2201

Open
quando632 wants to merge 6 commits into
devonfw:mainfrom
quando632:feature/2174-vscode-metadata
Open

#2174: store VSCode user-data under $IDE_HOME/.ide/vscode/<workspace>/config#2201
quando632 wants to merge 6 commits into
devonfw:mainfrom
quando632:feature/2174-vscode-metadata

Conversation

@quando632

@quando632 quando632 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2174 (part of #2142)

Moves VSCode user-data out of the workspace into the dedicated $IDE_HOME/.ide/vscode/«workspace»/config folder so workspaces stay clean and independent of the IDE.

Stacked on #2175 (#2172getIdeMetadataPath()); its commits appear here until #2175 is merged, then this branch is rebased onto main.

Implemented changes:

  • Vscode.configureToolArgs now points --user-data-dir to getIdeMetadataPath().resolve("config") instead of «workspace»/.vscode/.userdata. The folder VSCode opens (getWorkspacePath()) is unchanged.
  • Migration Mig202608001 (target 2026.08.001) moves any existing .vscode/.userdata of every workspace to the new location. It is idempotent: skips workspaces already migrated and skips (with a warning, no overwrite) if a target already exists. Registered in IdeMigrator.
  • Tests: VscodeTest.testConfigureToolArgsUsesIdeMetadataPathForUserData, Mig202608001Test (move, no-op, and target-exists cases).

Testing instructions

  1. cd cli && mvn -Dtest=VscodeTest,Mig202608001Test,IdeMigratorTest test — all pass.
  2. Manual: create $IDE_HOME/workspaces/main/.vscode/.userdata/state.json, run ide update, verify it moved to $IDE_HOME/.ide/vscode/main/config/state.json and the workspace no longer contains .vscode/.userdata.

Checklist for this PR

Coordination note

IdeMigrator requires strictly ascending migration versions. The JetBrains subtask (#2173) also adds a migration — whichever merges second must adjust its version to stay ascending.

@coveralls

coveralls commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29916747280

Coverage increased (+0.04%) to 72.537%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 9 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

9 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 6 78.69%
com/devonfw/tools/ide/migration/IdeMigrator.java 3 89.83%

Coverage Stats

Coverage Status
Relevant Lines: 16979
Covered Lines: 12843
Line Coverage: 75.64%
Relevant Branches: 7592
Covered Branches: 4980
Branch Coverage: 65.6%
Branches in Coverage %: Yes
Coverage Strength: 3.2 hits per line

💛 - Coveralls

@quando632 quando632 added enhancement New feature or request workspace workspaces sub-folder to manage sub-projects labels Jul 22, 2026
@quando632
quando632 marked this pull request as ready for review July 22, 2026 11:50
@quando632 quando632 moved this from 🆕 New to Team Review in IDEasy board Jul 22, 2026
@quando632 quando632 moved this from Team Review to 👀 In review in IDEasy board Jul 22, 2026
@quando632 quando632 moved this from 👀 In review to Team Review in IDEasy board Jul 22, 2026
@quando632 quando632 moved this from Team Review to 🏗 In progress in IDEasy board Jul 23, 2026
@quando632 quando632 moved this from 🏗 In progress to Team Review in IDEasy board Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request workspace workspaces sub-folder to manage sub-projects

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

VSCode: store metadata under $IDE_HOME/.ide/vscode/<workspace> + migration

2 participants