This is an automated email from the ASF dual-hosted git repository.
yesamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 709c492f8bc kie-tools#3967: [drl-vscode-extension] drl vscode ext
windows build (#3968)
709c492f8bc is described below
commit 709c492f8bca0ff5e59176ad78c94881ae100434
Author: Daniel Clark <[email protected]>
AuthorDate: Wed Sep 9 13:13:04 2026 +0200
kie-tools#3967: [drl-vscode-extension] drl vscode ext windows build (#3968)
---
.../drl-vscode-extension/.vscode/extensions.json | 7 ++++
packages/drl-vscode-extension/.vscode/launch.json | 46 ++++++++++++++++++++++
packages/drl-vscode-extension/package.json | 4 +-
scripts/bootstrap/link_packages_with_self.js | 4 +-
4 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/packages/drl-vscode-extension/.vscode/extensions.json
b/packages/drl-vscode-extension/.vscode/extensions.json
new file mode 100644
index 00000000000..c021dc24bbb
--- /dev/null
+++ b/packages/drl-vscode-extension/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ // Needed by the "Attach to LSP Server (Java)" configuration in launch.json:
+ // `"type": "java"` is contributed by vscode-java-debug, which in turn needs
+ // redhat.java. Without them that configuration fails with an unhelpful
+ // "configuration type 'java' is not supported".
+ "recommendations": ["redhat.java", "vscjava.vscode-java-debug"]
+}
diff --git a/packages/drl-vscode-extension/.vscode/launch.json
b/packages/drl-vscode-extension/.vscode/launch.json
new file mode 100644
index 00000000000..cf8dfa2b7db
--- /dev/null
+++ b/packages/drl-vscode-extension/.vscode/launch.json
@@ -0,0 +1,46 @@
+{
+ // Open `packages/drl-vscode-extension` as its own VS Code window, so that
+ // ${workspaceFolder} is the extension itself. Run `pnpm -F
drl-vscode-extension... build:dev`
+ // once beforehand: it bundles the client and copies the server JAR into
dist/.
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Run Extension",
+ "type": "extensionHost",
+ "request": "launch",
+ "runtimeExecutable": "${execPath}",
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
+ "outFiles": ["${workspaceFolder}/dist/**/*.js"]
+ },
+ {
+ // Does NOT spawn the server. The extension connects to one already
+ // listening on 127.0.0.1:9925 — start
org.drools.lsp.server.DroolsLspTCPLauncher
+ // yourself first, with the Java debugger attached if you want to step
through it.
+ "name": "Run Extension (connect to a running LSP server)",
+ "type": "extensionHost",
+ "request": "launch",
+ "runtimeExecutable": "${execPath}",
+ "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
+ "outFiles": ["${workspaceFolder}/dist/**/*.js"],
+ "env": {
+ "LSDEBUG": "true"
+ }
+ },
+ {
+ // Attaches to a server started with
+ // -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
+ "name": "Attach to LSP Server (Java)",
+ "type": "java",
+ "request": "attach",
+ "hostName": "127.0.0.1",
+ "port": 5005
+ }
+ ],
+ "compounds": [
+ {
+ // Launches the extension host and attaches the Java debugger together.
+ "name": "Extension + Java debugger",
+ "configurations": ["Run Extension (connect to a running LSP server)",
"Attach to LSP Server (Java)"]
+ }
+ ]
+}
diff --git a/packages/drl-vscode-extension/package.json
b/packages/drl-vscode-extension/package.json
index 36709db081b..b5021d8b579 100644
--- a/packages/drl-vscode-extension/package.json
+++ b/packages/drl-vscode-extension/package.json
@@ -19,7 +19,9 @@
"build:prod": "rimraf dist && webpack && pnpm pack:prod",
"compile": "webpack",
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then
\"kie-tools--eslint ./src\"",
- "pack:prod": "vsce package --githubBranch main --no-dependencies -o
./dist/drl_vscode_extension_$npm_package_version.vsix",
+ "pack:prod": "run-script-os",
+ "pack:prod:darwin:linux": "vsce package --githubBranch main
--no-dependencies -o ./dist/drl_vscode_extension_$npm_package_version.vsix",
+ "pack:prod:win32": "vsce package --githubBranch main --no-dependencies -o
./dist/drl_vscode_extension_%npm_package_version%.vsix",
"pretest": "pnpm build:dev && mvn -f src/testFixture/pom.xml -ntp compile
&& tsc -p tsconfig.test.json",
"test": "node ./out-test/test/runTest.js",
"watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false;
webpack --env dev"
diff --git a/scripts/bootstrap/link_packages_with_self.js
b/scripts/bootstrap/link_packages_with_self.js
index 06921d18470..b9c888f06ab 100644
--- a/scripts/bootstrap/link_packages_with_self.js
+++ b/scripts/bootstrap/link_packages_with_self.js
@@ -50,10 +50,10 @@ function selfLink(pkg, selfLinkPath) {
selfLinkPath
)} -> ${relTargetPath}`
);
- if (fs.existsSync(selfLinkPath)) {
+ if (fs.lstatSync(selfLinkPath, { throwIfNoEntry: false })) {
fs.unlinkSync(selfLinkPath);
}
- fs.symlinkSync(relTargetPath, selfLinkPath);
+ fs.symlinkSync(relTargetPath, selfLinkPath, process.platform === "win32" ?
"junction" : undefined);
}
main();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]