redhat-developer / redhat-developer/vscode-java
Code running in WSL:Ubuntu will not load the codestyle.xml located in the Windows filesystem
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I found that vscode cannot load an eclipse profile if vscode is using WSL as the terminal and the codestyle file is in the Windows filesystem. This I found is true regardless of the url syntax for local files, i.e., D:\path\to\file or /d/path/to/file. I had to copy the file into my WSL filesystem and reference is relative to the WSL root, i.e., /home/path/to/file.
Environment
- Operating System: Windows_NT x64 10.0.19042 + WSLv2 + Ubuntu 20.10
- JDK version: OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.10)
- Visual Studio Code version: 1.52.1, Electron 9.3.5
- Java extension version:
Steps To Reproduce
- configure Java › Format › Settings: Url to be drive_letter:\path\to\eclipse_codestyle.xml
- confirm the settings aren't used when formatting file
- configure Java › Format › Settings: Url to be file:///wsl_drive_mnt/path/to/eclipse_codestyle.xml
- confirm the settings aren't used when formatting file
- configure Java › Format › Settings: Url to be file:///path/to/eclipse_codestyle.xml
- confirm file is used when formatting file
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Java › Format › Settings: Url value is resolved when VS Code uses WSL, reproducing the issue with the Windows and WSL path forms listed in the steps. Done means an Eclipse codestyle.xml on the Windows filesystem is loaded and applied during formatting under WSL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, ubuntu, vscode
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100