vscode generates compile errors for valid test-jar dependencies
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Öffne zunächst test-jar-issue-projects.zip in VS Code, wobei beide Maven-Projekte geladen sind, und vergleiche dann die Diagnosen mit einem Workspace, der nur das konsumierende Projekt enthält. Führe mvn clean install aus, um zu bestätigen, dass die Projekte gültig sind; die Aufgabe ist abgeschlossen, wenn lokale test-jar-Importe bei vorhandenen beiden Projekten keine falschen Kompilierungsfehler mehr erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I have a non shipping "utility" maven module. It has a dependency on classes from a test-jar produced by another module. If both the utility maven module and the test-jar producing module are loaded in the workspace, vscode generates compile errors for all imported test-jar classes. See the first screenshot below. Note that the compile errors in vscode are incorrect and should not exist. In contrast, running "mvn clean install" results in a successful build and IntelliJ handles this situation fine (there are no compile errors).
If however the module that produces the test jar is not loaded in the workspace, there are no compile errors for the imported test-jar classes in vscode. See the second screenshot below. In otherwords, the compile error only shows up when the test-jar producing module is in the workspace with the test-jar consuming module. Apparently vscode/eclipse jdt cannot resolve the test classes when they are from a local project and imported by another project's src/main classes.
I will attach 2 small maven projects to demonstrate the problem. You can load them into vscode to reproduce. You can also build them from the command line with mvn to confirm they are valid.
Compile error when both test-jar consuming and producing projects are in the workspace
No compile error when the test-jar producing project is not in the workspace
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 547
- Ø Merge
- 5 Std. 36 Min.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus redhat-developer/vscode-java
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
redhat-developer/vscode-java#4511 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
redhat-developer/vscode-java#4426 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
redhat-developer/vscode-java#4506 · 7 Kommentare · 4 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
redhat-developer/vscode-java#4505 · 5 Kommentare · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
redhat-developer/vscode-java#4504 · 3 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in redhat-developer/vscode-java
Ähnliche Issues
-
triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
mermaid-js/mermaid-live-editor#2053 ·
Maintainer antworten meist innerhalb von 1 Tag
-
factory
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
jessepollak/home#1455 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
lingdojo/kana-dojo#31227 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
mobile: device viewer shows dark status bar icons on its dark backdrop in light mode (Android)Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
appandflow/stim#1838 ·
Maintainer antworten meist innerhalb von 1 Tag