Skip to content

#1937: link content from settings into workspace(s)#1983

Open
tineff96 wants to merge 20 commits into
devonfw:mainfrom
tineff96:feature/1937-settings-link
Open

#1937: link content from settings into workspace(s)#1983
tineff96 wants to merge 20 commits into
devonfw:mainfrom
tineff96:feature/1937-settings-link

Conversation

@tineff96

@tineff96 tineff96 commented May 29, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #1937

Implemented virtual settings repository feature. A settings.properties without
git_url now indicates a virtual repository that reuses the already cloned
$IDE_HOME/settings folder. Sub-folders from settings can be linked into
workspaces via the link property, e.g.:

workspaces=*
link=ai=.github

This avoids the need to create and maintain separate git repositories for
shared configuration content.

Implemented changes:

  • Added isVirtualSettingsRepository() to RepositoryConfig — returns true
    when id=settings and no git_url is set
  • Added createSettingsRepositoryLinks() to RepositoryCommandlet — iterates
    over all configured workspaces and creates symlinks
  • Added linkTargetExists() to RepositoryCommandlet — validates link target
    exists before creating symlink, logs warning and skips if not
  • Relaxed git_url validation in RepositoryProperties for virtual settings
    repositories
  • Added unit test testSetupVirtualSettingsRepository()

Testing instructions

Automated test

A JUnit test was added for this feature and can be executed with:

mvn -pl cli "-Dtest=RepositoryCommandletTest#testSetupVirtualSettingsRepositoryWithoutGitUrlWithLinks" test

The test verifies that a virtual settings repository without git_url can create configured links from the settings directory into the workspace.

Manual test

  1. Create a subfolder in $IDE_HOME/settings/, e.g. ai/, with any file inside.

  2. Create $IDE_HOME/settings/repositories/settings.properties with content:

workspaces=*
link=.github=ai

Note: no git_url property is required. This is intentional for a virtual settings repository.

  1. Run:
ide repository setup
  1. Verify that .github is a link pointing to $IDE_HOME/settings/ai/ in every workspace under $IDE_HOME/workspaces/.

  2. Run ide repository setup a second time. It should complete without errors.

  3. Change the link target to a non-existing folder, e.g.:

link=.github=nichtvorhanden

Run again. It should log that the target does not exist and skip the link without crashing.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board May 29, 2026
@tineff96 tineff96 changed the title #1937 Ability to link content from settings into workspace(s) #1937 link content from settings into workspace(s) May 29, 2026
@coveralls

coveralls commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 27688586400

Coverage increased (+0.007%) to 71.292%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

33 previously-covered lines in 3 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/git/repository/RepositoryCommandlet.java 24 73.43%
com/devonfw/tools/ide/git/repository/RepositoryProperties.java 8 89.31%
com/devonfw/tools/ide/version/VersionSegment.java 1 90.55%

Coverage Stats

Coverage Status
Relevant Lines: 16231
Covered Lines: 12063
Line Coverage: 74.32%
Relevant Branches: 7268
Covered Branches: 4690
Branch Coverage: 64.53%
Branches in Coverage %: Yes
Coverage Strength: 3.15 hits per line

💛 - Coveralls

@tineff96 tineff96 added enhancement New feature or request repository Commandlet to clone, build or import git repositories settings ide-settings repo and replated processes and features link symlinks and windows junctions labels May 29, 2026
@tineff96

Copy link
Copy Markdown
Contributor Author

Note: mvn clean test fails with 7 errors in InstallCommandletTest on Windows.
This is a pre-existing issue unrelated to this PR, reproducible on main branch
and a second Windows machine. Tracked in #1985.

@tineff96 tineff96 self-assigned this Jun 1, 2026
@tineff96 tineff96 moved this from 🆕 New to 🏗 In progress in IDEasy board Jun 1, 2026
@tineff96 tineff96 force-pushed the feature/1937-settings-link branch from f7ec9f6 to cb85dbe Compare June 2, 2026 12:31
@tineff96 tineff96 marked this pull request as ready for review June 3, 2026 08:09
@tineff96 tineff96 moved this from 🏗 In progress to Team Review in IDEasy board Jun 3, 2026
@hohwille hohwille changed the title #1937 link content from settings into workspace(s) #1937: link content from settings into workspace(s) Jun 3, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tineff96 thanks for your PR. You found the right spots and your changes to config and properties seem perfect. 👍
I added some review comment to better reuse existing code avoiding redundancies.
Since you add a new feature, could you also add a JUnit test method covering it?

Comment thread cli/src/main/java/com/devonfw/tools/ide/git/repository/RepositoryCommandlet.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request link symlinks and windows junctions repository Commandlet to clone, build or import git repositories settings ide-settings repo and replated processes and features

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Ability to link content from settings into workspace(s)

3 participants