Skip to content

DAP: the expansion of ~ in a run configuration's paths uses FileUtil.expandUserHome, which IntelliJ 2025.3 schedules for removal #2327

Done

Description

@lagergren

A DAP run configuration expands ~ in its Working directory and File since #2302 (fixes #2299), merged for 0.30.2. It does so in DAPRunConfigurationOptions.resolvePath, with FileUtil.expandUserHome(String), which IntelliJ 2025.3 schedules for removal.

What the verifier says

Verify plugin on main at 0c5aa98 reports "1 usage of scheduled for removal API" against 2025.3, 2026.1, 2026.2 and 2026.3, and none against 2024.2 to 2025.2:

FileUtil.expandUserHome(java.lang.String path) is invoked in DAPRunConfigurationOptions.resolvePath(String, String). This method will be removed in a future release

It is the only API scheduled for removal that LSP4IJ uses. It's not in #1971, which was filed before #2302.

The replacement is too new to call

In the jars of each release:

Release FileUtil.expandUserHome OSAgnosticPathUtil.expandUserHome
2024.2, 2025.1, 2025.2 public, not deprecated missing
2025.3, 2026.3 @Deprecated, @ApiStatus.ScheduledForRemoval public

LSP4IJ's minimum is 2024.2, and 2025.1 for 0.31.0 (#2038, #2042), so it can't call OSAgnosticPathUtil.expandUserHome.

Proposed fix

LSP4IJ's own implementation, as #1927 did for PathEnvironmentVariableUtil.findInPath. In 2024.2, FileUtil.expandUserHome:

  • returns the user's home for ~;
  • replaces the ~ of a path that starts with ~/ or ~\ with the user's home;
  • returns any other path as it is, so ~user isn't expanded.

That is a few lines with SystemProperties.getUserHome(), which is public and not deprecated on 2024.2 to 2026.3. DAPRunConfigurationOptionsResolvedPathTest already covers the paths with ~, and should pass unchanged.

0.30.2 is the first release with this use, as it was for the FileUtil.delete(Path) that #2277 replaced.

cc @angelozerr

Activity

  1. added
    dap
    on Nov 28, 2026
  2. added this to the 0.30.2 milestone on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapdebt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions