Repository navigation
Issues not Reported after Import #4230
Description
Activity
I see the 11k problems/error once the import finishes, without the need to do any additional builds. My autobuild is enabled (that's the default), but the only thing I can think of is I have
java.configuration.updateBuildConfigurationset toautomatic.The strange part (other than why isn't the import reporting everything the first time) is Lifecycle and Plugin are in the same source package. One can even go to the definition of Plugin from Lifecycle yet the diagnostics still report that the import cannot be resolved.
Same here, problems are reported immediately after import. Most likely, the errors are caused by the missing m2eclipse-modello plugin, that would generate the missing classes via modello, during the build.
@rgrunber are the telemetry-reported errors supposed to include project compilation errors?
Looking at the code, I think we count all unresolved imports anywhere in the discovered Java projects, as well as any errors on the "project folder" itself. We don't currently report the error message/trace (though maybe we'd want to). I think the build systems tend to report serious build errors on folders as well as on the build files (we don't count there currently) (pom.xml, build.gradle, etc.)
It seems that with autobuild on, the errors get reported eventually, However, the telemetry event still seems to report no import problems.
When I run the attached extensions, I get the following telemetry report for the "maven" project:
{ "name": "java.workspace.initialized", "properties": { "project.projectErrorCount": "0", "project.unresolvedImportErrorCount": "0", "project.autobuild": "true", "project.jdkMismatch": "false", "buildToolNames": [ "Maven" ], "javaProjectCount": 81, "javac.enabled": "false", "compiler.source.min": "17.0", "compiler.source.max": "17.0", "time.projectsinitialized": "2955", "time.serviceready": "3141", "time.buildFinished": "233904", "initialization.first": "false", "dependency.count": "146", "dependency.size": "51488316" } }Here's the extension source:
@fbricon this PR (eclipse-jdtls/eclipse.jdt.ls#3589) delays reporting until the initial build is really finished for me.
Fixed with eclipse-jdtls/eclipse.jdt.ls#3589
I suspect that we're underreporting issues with project imports via telemetry. Here's a scenario:
org.apache.maven.api.model.Plugincannot be found inLifeCycle.javaNote that the import errors are correct: the problem I'm reporting is that when we report the telemetry event
java.workspace.initialized, the problems are not yet present. This makes our numbers for successful import unreliable. In particular, they are probably worse than what we think.