redhat-developer / redhat-developer/vscode-java

"No build tools" Java projects auto-import skipped due to presence of "build tools" Java projects in same workspace

Aperta
#4,363 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

Describe the bug
Java projects without build tools are being skipped during auto-import due to the presence of Java projects with build tools in the same workspace. This results in missing imports and project configuration issues.

To Reproduce
Steps to reproduce the behavior:

  1. Create a workspace containing both Java projects with build tools (e.g., Maven, Gradle) and Java projects without build tools.
  2. Clean the Java language server workspace to trigger auto-import on startup.
  3. The Java projects without build tools fail to auto-import properly or are ignored/skipped by the extension, as they are not visible in the list of projects to import and do not import at all when opening any Java file in such projects.

Expected behavior
Java projects without build tools should be available as options to select in the import java projects list, allowing a non-build-tooled Java project to be imported correctly instead of skipped.

Environment

  • Operating System: Windows
  • JDK version: 21
  • Visual Studio Code version: 1.111.0
  • Java extension version: 1.53.0

Additional Information
When opening a Java file in a Java project without build tools, it will be automatically imported and added to the Java projects list, therefore auto-importing works fine as long as build tools projects aren't in the same workspace.

The best solution seems to be to add these types of projects to the list of importable Java projects and allow selection of non-build-tooled projects.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre il problema in Visual Studio Code con un workspace contenente sia progetti Maven o Gradle sia progetti senza strumenti di build, quindi pulire il workspace del Java language server per attivare l'importazione automatica all'avvio. Seguire l'elenco dei progetti importabili e verificare che i progetti senza strumenti di build vi compaiano e possano essere selezionati e importati senza aprire prima un file Java.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.