дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 18:17:15 +02:00
fix(java): say which build errors kept a module out of jdtls when Run or Debug starts (#5526)
When m2e or Buildship can't configure a module (e.g. a build plugin that doesn't resolve from the mirror), jdtls keeps it out of the Java model and puts the reason on the module's build file. Run and Debug waited 90 s and then said the module was not imported, or reported compile errors with none listed. The launch now reports the errors jdtls put on the build files of the module and its enclosing builds (pom.xml, build.gradle(.kts), settings.gradle(.kts)) without waiting, as ErrorData::JavaBuildProblems. Fixes #5525. Co-authored-by: wildcatDownstairs <[email protected]>
Цей коміт міститься в:
1 джерело
bb850b25d6
коміт
798c88226c
7 files changed
+123
-7
No files matched your search
@@ -266,6 +266,12 @@ export async function prepareJavaLaunch(config: RunConfig, preparation: JavaPrep
|
||||
const info = await call(
|
||||
commands.javaResolveLaunch(module, parsed.classpath === "test", policy, preparation.request),
|
||||
).catch((error: unknown) => {
|
||||
if (error instanceof IpcError && error.data?.type === "javaBuildProblems") {
|
||||
const problems = error.data.problems.join("; ");
|
||||
throw new Error(
|
||||
tx`Java module '${module || "."}' could not be imported because its build has errors: ${problems}. Fix them, then reload the Maven or Gradle project.`,
|
||||
);
|
||||
}
|
||||
if (
|
||||
error instanceof IpcError &&
|
||||
error.kind !== "cancelled" &&
|
||||
|
||||
Reference in new issue
Заблокувати користувача