Порівняти коміти

...
Автор SHA1 Повідомлення Дата
arookieofc 92da1a76ff fix(build): translate the module-scoped Build Artifacts description
The new action description needs a zh catalog entry (the only complete
locale) and the old text must go from every catalog (the stale-entry
check covers all locales); otherwise textCatalog.test.ts fails.

Refs #2476
2026-11-10 15:34:49 +08:00
arookieofc e4981055fe fix(build): scope Build Artifacts to the active file's module
Build Artifacts always packaged the whole reactor (all 57 modules in the
reporter's project) because the frontend passed a null file. Route it
through moduleTarget like Build Module does, so Maven runs
'-pl <module> -am package' and Gradle runs '<module>:assemble'; with no
active file it still falls back to the whole project. Backend already
supported module-scoped artifacts for Maven and Gradle, no Rust change.

Refs #2476
2026-11-10 14:59:52 +08:00
8 змінених файлів з 28 додано та 9 видалено

No files matched your search

+24
Переглянути файл
@@ -324,6 +324,30 @@ describe("build feature", () => {
});
});
it("scopes Build Artifacts to the active file's module, or the whole project without one", async () => {
provideEditorService({
openFile,
saveAll: () => Promise.resolve(),
activePath: () => "/p/core/src/A.java",
} as unknown as EditorService);
await executeAction("build.buildArtifacts", { activate: false });
expect(fake.calls.at(-1)).toMatchObject({ kind: "artifacts", file: "/p/core/src/A.java" });
await act(async () => {
fake.resolve(result([], true));
});
provideEditorService({
openFile,
saveAll: () => Promise.resolve(),
activePath: () => null,
} as unknown as EditorService);
await executeAction("build.buildArtifacts", { activate: false });
expect(fake.calls.at(-1)).toMatchObject({ kind: "artifacts", file: null });
await act(async () => {
fake.resolve(result([], true));
});
});
it("starts a build without a workbench", async () => {
show.mockImplementation(() => {
throw new Error("No workbench");
+3 -3
Переглянути файл
@@ -102,14 +102,14 @@ export function activate(): () => void {
{
id: "build.buildArtifacts",
title: "Build Artifacts",
description: "Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)",
description: "Packages the current module's artifacts, or the whole project when no file is active",
category: "Build",
when: WHEN,
keywords: ["package", "assemble", "jar", "release"],
keywords: ["package", "assemble", "jar", "release", "module"],
run: ({ arg }) => {
const options = typeof arg === "object" && arg !== null ? arg : {};
const activate = !("activate" in options && options.activate === false);
const build = startBuild("artifacts", null, activate);
const build = startBuild("artifacts", moduleTarget(arg), activate);
if ("wait" in options && options.wait === true) return build.then(() => undefined);
},
},
-1
Переглянути файл
@@ -1476,7 +1476,6 @@
"Package manager": "Administrador de paquetes",
"Package to install": "Paquete a instalar",
"Packages": "Paquetes",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "Empaqueta el proyecto (mvn package, gradle assemble, cargo build --release, npm run build)",
"Page size": "Tamaño de página",
"Parameter Info": "Información de parámetros",
"Parameter names": "Nombres de parámetros",
-1
Переглянути файл
@@ -1404,7 +1404,6 @@
"Package manager": "Gestionnaire de paquets",
"Package to install": "Paquet à installer",
"Packages": "Paquets",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "Empaquette le projet (mvn package, gradle assemble, cargo build --release, npm run build)",
"Page size": "Taille de page",
"Parameter Info": "Informations sur les paramètres",
"Parameter names": "Noms des paramètres",
-1
Переглянути файл
@@ -1518,7 +1518,6 @@
"Package manager": "패키지 관리자",
"Package to install": "설치할 패키지",
"Packages": "패키지",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "프로젝트를 패키징합니다(mvn package, gradle assemble, cargo build --release, npm run build)",
"Page size": "페이지 크기",
"Parameter Info": "매개변수 정보",
"Parameter names": "매개변수 이름",
-1
Переглянути файл
@@ -1466,7 +1466,6 @@
"Package manager": "Menedżer pakietów",
"Package to install": "Pakiet do zainstalowania",
"Packages": "Pakiety",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "Pakuje projekt (mvn package, gradle assemble, cargo build --release, npm run build)",
"Page size": "Rozmiar strony",
"Parameter Info": "Informacje o parametrach",
"Parameter names": "Nazwy parametrów",
-1
Переглянути файл
@@ -1466,7 +1466,6 @@
"Package manager": "Gerenciador de pacotes",
"Package to install": "Pacote a instalar",
"Packages": "Pacotes",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "Empacota o projeto (mvn package, gradle assemble, cargo build --release, npm run build)",
"Page size": "Tamanho da página",
"Parameter Info": "Informações de parâmetros",
"Parameter names": "Nomes dos parâmetros",
+1 -1
Переглянути файл
@@ -1671,7 +1671,7 @@
"Package manager": "软件包管理器",
"Package to install": "要安装的软件包",
"Packages": "软件包",
"Packages the project (mvn package, gradle assemble, cargo build --release, npm run build)": "打包项目(mvn package、gradle assemble、cargo build --release、npm run build)",
"Packages the current module's artifacts, or the whole project when no file is active": "打包当前模块的产物,无活动文件时则打包整个项目",
"Page size": "页面大小",
"Parameter Info": "形参信息",
"Parameter names": "形参名称",