redhat-developer / redhat-developer/vscode-java

Code running in WSL:Ubuntu will not load the codestyle.xml located in the Windows filesystem

Offen
#1,783 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

documentation enhancement
Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

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
  1. configure Java › Format › Settings: Url to be drive_letter:\path\to\eclipse_codestyle.xml
  2. confirm the settings aren't used when formatting file
  3. configure Java › Format › Settings: Url to be file:///wsl_drive_mnt/path/to/eclipse_codestyle.xml
  4. confirm the settings aren't used when formatting file
  5. configure Java › Format › Settings: Url to be file:///path/to/eclipse_codestyle.xml
  6. confirm file is used when formatting file

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie damit, nachzuverfolgen, wie der Wert Java › Format › Settings: Url aufgelöst wird, wenn VS Code WSL verwendet, und reproduzieren Sie das Problem mit den in den Schritten aufgeführten Windows- und WSL-Pfadformen. Als abgeschlossen gilt die Aufgabe, wenn eine Eclipse codestyle.xml im Windows-Dateisystem geladen und beim Formatieren unter WSL angewendet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, typescript, ubuntu, vscode
Bereich
operating-systems, tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.