diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e1531a3 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry = https://registry.npmjs.org \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index dc6fbea..0fb22c4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -74,7 +74,6 @@ "runtimeExecutable": "${execPath}", "debugWebviews": true, "args": [ - "--disable-extensions", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionDevelopmentPath=${workspaceRoot}/../vscode-java" ], @@ -97,7 +96,6 @@ "request": "launch", "runtimeExecutable": "${execPath}", "args": [ - "--disable-extensions", "--disable-workspace-trust", "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test/suite/index", diff --git a/README.md b/README.md index f60da8f..45a6ce2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# Bazel extension for Java™️ Language Support for VS Code +# Bazel extension for Java™️ Language Support by Compass for VS Code -[![Build](https://github.com/salesforce/bazel-vscode-java/actions/workflows/ci.yml/badge.svg)](https://github.com/salesforce/bazel-vscode-java/actions/workflows/ci.yml) -[![License](https://img.shields.io/github/license/salesforce/bazel-vscode-java?style=for-the-badge)](https://github.com/salesforce/bazel-vscode-java/blob/master/LICENSE) +[![Build](https://github.com/zhirui1994/bazel-vscode-java/actions/workflows/ci.yml/badge.svg)](https://github.com/zhirui1994/bazel-vscode-java/actions/workflows/ci.yml) +[![License](https://img.shields.io/github/license/zhirui1994/bazel-vscode-java?style=for-the-badge)](https://github.com/zhirui1994/bazel-vscode-java/blob/master/LICENSE) This extension adds support for Bazel to the Java™️ Language Support for VS Code. It plugs into the Eclipse Java Language server and computes project dependencies and classpath information using Bazel `BUILD` files. ## Getting Started -Go and [install the extension](vscode:extension/sfdc.bazel-vscode-java) from the VSCode Marketplace (see [listing here](https://marketplace.visualstudio.com/items?itemName=sfdc.bazel-vscode-java)) or OpenVSX Registry (see [listing here](https://open-vsx.org/extension/sfdc/bazel-vscode-java)). +Go and [install the extension](vscode:extension/COMP.java-bazel-extension-compass) from the VSCode Marketplace (see [listing here](https://marketplace.visualstudio.com/items?itemName=COMP.java-bazel-extension-compass)) or OpenVSX Registry (see [listing here](https://open-vsx.org/extension/COMP/java-bazel-extension-compass)). Once installed, open VSCode in any Bazel Workspace with Java targets. The extension will look for a `WORKSPACE` (`WORKSPACE.bazel`) file to identify a Bazel workspace. diff --git a/flake.lock b/flake.lock deleted file mode 100644 index e34056d..0000000 --- a/flake.lock +++ /dev/null @@ -1,25 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1744098102, - "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", - "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", - "revCount": 780821, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.780821%2Brev-c8cd81426f45942bb2906d5ed2fe21d2f19d95b7/01961896-6594-781c-9822-188112a7194e/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 65a926a..0000000 --- a/flake.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - description = "A Nix-flake-based Java development environment"; - - inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; - - outputs = { self, nixpkgs }: - let - javaVersion = 23; # Change this value to update the whole stack - - supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; - forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { - pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; - }); - in - { - overlays.default = - final: prev: - let - jdk = prev."jdk${toString javaVersion}"; - in - { - inherit jdk; - maven = prev.maven.override { jdk_headless = jdk; }; - gradle = prev.gradle.override { java = jdk; }; - lombok = prev.lombok.override { inherit jdk; }; - }; - - devShells = forEachSupportedSystem ({ pkgs }: { - default = pkgs.mkShell { - packages = with pkgs; [ - gcc - gradle - jdk - maven - ncurses - patchelf - zlib - ]; - - shellHook = - let - loadLombok = "-javaagent:${pkgs.lombok}/share/java/lombok.jar"; - prev = "\${JAVA_TOOL_OPTIONS:+ $JAVA_TOOL_OPTIONS}"; - in - '' - export JAVA_TOOL_OPTIONS="${loadLombok}${prev}" - ''; - }; - }); - }; -} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 958781d..07429f1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -144,13 +144,33 @@ function downloadServerImpl() { function buildServerImpl() { fs.rmSync('./server', { recursive: true, force: true }); - cp.execSync(mvnw() + ' clean package -DskipTests=true', { - cwd: BAZEL_ECLIPSE_DIR, - stdio: [0, 1, 2], - }); + const jdtlsJar = fs + .readdirSync( + BAZEL_ECLIPSE_DIR + '/releng/p2repository/target/repository/plugins/' + ) + .find( + (file) => + file.startsWith('com.salesforce.bazel.eclipse.jdtls') && + file.endsWith('.jar') + ); + + if (jdtlsJar) { + console.log( + 'NOTE: skipping build and re-using existing "' + + jdtlsJar + + '" from ../bazel-eclipse/releng/p2repository/target/repository/plugins' + ); + } else { + cp.execSync(mvnw() + ' clean package -DskipTests=true', { + cwd: BAZEL_ECLIPSE_DIR, + stdio: [0, 1, 2], + }); + } gulp .src( - BAZEL_ECLIPSE_DIR + '/releng/p2repository/target/repository/plugins/*.jar' + BAZEL_ECLIPSE_DIR + + '/releng/p2repository/target/repository/plugins/*.jar', + { encoding: false } // prevent gulp from reading the content as it's not needed ) .pipe(DROP_JAR_VERSION) .pipe(jarIsIncludedInPackageJson) diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..1296a79 Binary files /dev/null and b/icon.png differ diff --git a/package-lock.json b/package-lock.json index aa8634d..9442c48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,23 @@ { - "name": "bazel-java", - "version": "1.4.1", + "name": "java-bazel-extension", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "bazel-java", - "version": "1.4.1", + "name": "java-bazel-extension", + "version": "0.0.2", "license": "BSD-3-Clause", + "dependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/exporter-metrics-otlp-proto": "^0.203.0", + "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0", + "@opentelemetry/resources": "^2.0.1", + "@opentelemetry/sdk-metrics": "^2.0.1", + "@opentelemetry/sdk-trace-web": "^2.0.1", + "@opentelemetry/semantic-conventions": "^1.36.0", + "fast-xml-parser": "^4.4.1" + }, "devDependencies": { "@types/glob": "^8.1.0", "@types/mocha": "^8.0.4", @@ -41,7 +51,7 @@ "vscode-languageclient": "^9.0.1" }, "engines": { - "vscode": "^1.100.0" + "vscode": "^1.80.0" } }, "node_modules/@azu/format-text": { @@ -1045,6 +1055,434 @@ "node": ">= 8" } }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/api-logs": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.203.0.tgz", + "integrity": "sha512-9B9RU0H7Ya1Dx/Rkyc4stuBZSGVQF27WigitInx2QQoj6KUpEFYPKoWjdFTunJYxmXmh17HeBvbMa1EhGyPmqQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.3.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/core": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", + "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-http": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.203.0.tgz", + "integrity": "sha512-HFSW10y8lY6BTZecGNpV3GpoSy7eaO0Z6GATwZasnT4bEsILp8UJXNG5OmEsz4SdwCSYvyCbTJdNbZP3/8LGCQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.203.0", + "@opentelemetry/otlp-transformer": "0.203.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.9.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.203.0.tgz", + "integrity": "sha512-OZnhyd9npU7QbyuHXFEPVm3LnjZYifuKpT3kTnF84mXeEQ84pJJZgyLBpU4FSkSwUkt/zbMyNAI7y5+jYTWGIg==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.203.0", + "@opentelemetry/otlp-exporter-base": "0.203.0", + "@opentelemetry/otlp-transformer": "0.203.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-metrics": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-metrics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.9.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/exporter-trace-otlp-proto": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.203.0.tgz", + "integrity": "sha512-1xwNTJ86L0aJmWRwENCJlH4LULMG2sOXWIVw+Szta4fkqKVY50Eo4HoVKKq6U9QEytrWCr8+zjw0q/ZOeXpcAQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-exporter-base": "0.203.0", + "@opentelemetry/otlp-transformer": "0.203.0", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/otlp-exporter-base": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.203.0.tgz", + "integrity": "sha512-Wbxf7k+87KyvxFr5D7uOiSq/vHXWommvdnNE7vECO3tAhsA2GfOlpWINCMWUEPdHZ7tCXxw6Epp3vgx3jU7llQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/otlp-transformer": "0.203.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/otlp-transformer": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.203.0.tgz", + "integrity": "sha512-Y8I6GgoCna0qDQ2W6GCRtaF24SnvqvA8OfeTi7fqigD23u8Jpb4R5KFv/pRvrlGagcCLICMIyh9wiejp4TXu/A==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.203.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/sdk-logs": "0.203.0", + "@opentelemetry/sdk-metrics": "2.0.1", + "@opentelemetry/sdk-trace-base": "2.0.1", + "protobufjs": "^7.3.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", + "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.9.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/resources": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.5.0.tgz", + "integrity": "sha512-F8W52ApePshpoSrfsSk1H2yJn9aKjCrbpQF1M9Qii0GHzbfVeFUB+rc3X4aggyZD8x9Gu3Slua+s6krmq6Dt8g==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.5.0", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.5.0.tgz", + "integrity": "sha512-ka4H8OM6+DlUhSAZpONu0cPBtPPTQKxbxVzC4CzVx5+K4JnroJVBtDzLAMx4/3CDTJXRvVFhpFjtl4SaiTNoyQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-logs": { + "version": "0.203.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.203.0.tgz", + "integrity": "sha512-vM2+rPq0Vi3nYA5akQD2f3QwossDnTDLvKbea6u/A2NZ3XDkPxMfo/PNrDoXhDUD/0pPo2CdH5ce/thn9K0kLw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.203.0", + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.4.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-metrics": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.5.0.tgz", + "integrity": "sha512-BeJLtU+f5Gf905cJX9vXFQorAr6TAfK3SPvTFqP+scfIpDQEJfRaGJWta7sJgP+m4dNtBf9y3yvBKVAZZtJQVA==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.5.0", + "@opentelemetry/resources": "2.5.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.9.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.5.0.tgz", + "integrity": "sha512-ka4H8OM6+DlUhSAZpONu0cPBtPPTQKxbxVzC4CzVx5+K4JnroJVBtDzLAMx4/3CDTJXRvVFhpFjtl4SaiTNoyQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.0.1.tgz", + "integrity": "sha512-xYLlvk/xdScGx1aEqvxLwf6sXQLXCjk3/1SQT9X9AoN5rXRhkdvIFShuNNmtTEPRBqcsMbS4p/gJLNI2wXaDuQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/resources": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/resources": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", + "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.0.1", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-web": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-web/-/sdk-trace-web-2.5.0.tgz", + "integrity": "sha512-xWibakHs+xbx6vxH7Q8TbFS6zjf812o/kIS4xBDB32qSL9wF+Z5IZl2ZAGu4rtmPBQ7coZcOd684DobMhf8dKw==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.5.0", + "@opentelemetry/sdk-trace-base": "2.5.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.5.0.tgz", + "integrity": "sha512-ka4H8OM6+DlUhSAZpONu0cPBtPPTQKxbxVzC4CzVx5+K4JnroJVBtDzLAMx4/3CDTJXRvVFhpFjtl4SaiTNoyQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.5.0.tgz", + "integrity": "sha512-VzRf8LzotASEyNDUxTdaJ9IRJ1/h692WyArDBInf5puLCjxbICD6XkHgpuudis56EndyS7LYFmtTMny6UABNdQ==", + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.5.0", + "@opentelemetry/resources": "2.5.0", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/semantic-conventions": { + "version": "1.39.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.39.0.tgz", + "integrity": "sha512-R5R9tb2AXs2IRLNKLBJDynhkfmx7mX0vi8NkhZb3gUkPWHn6HXk5J8iQ/dql0U3ApfWym4kXXmBDRGO+oeOfjg==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -1069,6 +1507,70 @@ "url": "https://opencollective.com/pkgr" } }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, "node_modules/@secretlint/config-creator": { "version": "10.2.2", "resolved": "https://registry.npmjs.org/@secretlint/config-creator/-/config-creator-10.2.2.tgz", @@ -1383,7 +1885,6 @@ "version": "20.19.25", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", - "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.21.0" @@ -1459,7 +1960,6 @@ "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/types": "6.21.0", @@ -1991,7 +2491,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4025,7 +4524,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -4178,7 +4676,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -4235,7 +4732,6 @@ "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -4636,6 +5132,24 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fast-xml-parser": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", + "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^1.1.1" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -5416,7 +5930,6 @@ "integrity": "sha512-PErok3DZSA5WGMd6XXV3IRNO0mlB+wW3OzhFJLEec1jSERg2j1bxJ6e5Fh6N6fn3FH2T9AP4UYNb/pYlADB9sA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "glob-watcher": "^6.0.0", "gulp-cli": "^3.1.0", @@ -7682,6 +8195,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -9258,7 +9777,6 @@ "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -9289,6 +9807,30 @@ "dev": true, "license": "MIT" }, + "node_modules/protobufjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/psl": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", @@ -10805,6 +11347,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", + "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, "node_modules/structured-source": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/structured-source/-/structured-source-4.0.0.tgz", @@ -11539,7 +12093,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -11652,7 +12205,6 @@ "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, "license": "MIT" }, "node_modules/unicorn-magic": { diff --git a/package.json b/package.json index 08069d9..28ed7fa 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,20 @@ { - "name": "bazel-java", - "displayName": "Bazel extension for Java(TM) Language Support by Salesforce OSS", - "description": "Bazel support for Java Linting, Intellisense, formatting, refactoring and more...", - "author": "Salesforce OSS", + "name": "java-bazel-extension-compass", + "displayName": "Bazel extension for Java(TM) Language Support by Compass", + "description": "Bazel extension for Java development with Intellisense, project sync, run targets, multi-root workspace, and buildifier integration.", + "author": "Compass", "license": "BSD-3-Clause", - "version": "1.5.0", - "publisher": "sfdc-eng", - "bugs": "https://github.com/salesforce/bazel-vscode-java/issues", + "version": "0.0.9", + "icon": "icon.png", + "publisher": "COMP", + "bugs": "https://github.com/zhirui1994/bazel-vscode-java/issues", "preview": true, "engines": { - "vscode": "^1.100.0" + "vscode": "^1.80.0" }, "repository": { "type": "git", - "url": "https://github.com/salesforce/bazel-vscode-java" + "url": "https://github.com/zhirui1994/bazel-vscode-java" }, "categories": [ "Programming Languages", @@ -39,6 +40,7 @@ "javaExtensions": [ "./server/org.eclipse.equinox.event.jar", "./server/com.github.ben-manes.caffeine.jar", + "./server/org.apache.velocity.engine-core.jar", "./server/org.jsr-305.jar", "./server/org.fusesource.jansi.jar", "./server/com.google.protobuf.jar", @@ -53,7 +55,163 @@ ".*\\.bazelproject$", ".*\\.java$" ], + "languages": [ + { + "id": "bazelproject", + "aliases": [ + "bazelproject" + ], + "extensions": [ + ".bazelproject" + ], + "configuration": "./syntaxes/bazelproject-language-configuration.json" + }, + { + "id": "starlark", + "aliases": [ + "Starlark", + "starlark", + "Bazel" + ], + "extensions": [ + ".BUILD", + ".WORKSPACE", + ".bazel", + ".bzl", + ".bzlmod", + ".sky", + ".star" + ], + "filenames": [ + "BUILD", + "WORKSPACE" + ], + "configuration": "./syntaxes/starlark-language-configuration.json" + } + ], + "grammars": [ + { + "language": "bazelproject", + "scopeName": "source.bazelproject", + "path": "./syntaxes/bazelproject.tmLanguage.json" + }, + { + "language": "starlark", + "scopeName": "source.starlark", + "path": "./syntaxes/starlark.tmLanguage.json" + } + ], + "taskDefinitions": [ + { + "type": "bazel", + "required": [ + "name", + "task" + ], + "properties": { + "name": { + "type": "string", + "description": "User readable bazel run target name" + }, + "task": { + "type": "string", + "description": "The full bazel command to be executed" + } + } + } + ], + "configuration": { + "title": "Bazel Java", + "properties": { + "java.bazel-vscode.enabled": { + "type": "boolean", + "default": false, + "description": "Enable Bazel support for Java Language Server.", + "scope": "window" + }, + "java.import.bazel.disabled": { + "type": "boolean", + "default": false, + "description": "Disable the Bazel importer.", + "scope": "window" + }, + "java.bazel.log.level": { + "type": "string", + "enum": [ + "debug", + "warn", + "info", + "error", + "trace" + ], + "default": "info", + "description": "Configure detailed logging (debug, warn, info, error)", + "scope": "window" + }, + "bazel.projectview.open": { + "type": "boolean", + "default": true, + "description": "Open the Bazel Project View file on extension activation", + "scope": "window" + }, + "bazel.projectview.updateFileWatcherExclusion": { + "type": "boolean", + "default": true, + "description": "update the files.watcherExclude setting to only watch directories specified in the .bazelproject file.", + "scope": "window" + }, + "bazel.projectview.notification": { + "type": "boolean", + "default": true, + "description": "Display 'sync project view' notification info window on .bazelproject edit", + "scope": "window" + }, + "bazel.buildifier.enable": { + "type": "boolean", + "default": true, + "description": "Enable buildifier formatting tool on save", + "scope": "window" + }, + "bazel.buildifier.binary": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "path to buildifier binary. If not set buildifier from your PATH will be used", + "scope": "window" + }, + "bazel.telemetry.endpoint": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "OTEL endpoint to send telemetry", + "scope": "window" + }, + "bazel.telemetry.headers": { + "type": [ + "object", + "null" + ], + "default": null, + "description": "OTEL headers", + "scope": "window" + } + } + }, "commands": [ + { + "command": "java.bazel.syncProjects.command", + "title": "Synchronize Projects with Bazel Project View", + "category": "Java" + }, + { + "command": "java.bazel.syncDirectoriesOnly.command", + "title": "Synchronize only directories", + "category": "Bazel" + }, { "command": "java.bazel.updateClasspaths.command", "title": "Refresh classpath from Bazel BUILD file", @@ -68,10 +226,50 @@ "command": "java.bazel.showStatus", "title": "Show Bazel Build Status", "category": "Bazel" + }, + { + "command": "bazelTaskOutline.refresh", + "title": "Refresh Bazel Run Configs", + "category": "Bazel", + "icon": "$(sync)" + }, + { + "command": "bazelTaskOutline.run", + "title": "Run Bazel Target", + "category": "Bazel", + "icon": "$(debug-start)" + }, + { + "command": "bazelTaskOutline.kill", + "title": "Kill Bazel Target", + "category": "Bazel", + "icon": "$(debug-stop)" + }, + { + "command": "bazel.projectview.open", + "title": "Open the Bazel Project View file", + "category": "Bazel" + }, + { + "command": "bazel.convert.workspace", + "title": "Convert to Multi-Root workspace", + "category": "Bazel" } ], + "views": { + "explorer": [ + { + "id": "bazelTaskOutline", + "name": "Bazel Run Targets" + } + ] + }, "menus": { "commandPalette": [ + { + "command": "java.bazel.syncProjects.command", + "when": "javaLSReady" + }, { "command": "java.bazel.updateClasspaths.command", "when": "javaLSReady && isFileSystemResource" @@ -79,14 +277,54 @@ { "command": "java.bazel.debug.command", "when": "javaLSReady && isFileSystemResource" + }, + { + "command": "bazelTaskOutline.refresh", + "when": "false" + }, + { + "command": "bazelTaskOutline.run", + "when": "false" + }, + { + "command": "bazelTaskOutline.kill", + "when": "false" + }, + { + "command": "bazel.projectview.open", + "when": "isBazelWorkspaceRoot" } ], "explorer/context": [ + { + "command": "java.bazel.syncProjects.command", + "when": "javaLSReady", + "group": "1_javaactions@10" + }, { "command": "java.bazel.updateClasspaths.command", "when": "javaLSReady && isFileSystemResource", "group": "1_javaactions@11" } + ], + "view/title": [ + { + "command": "bazelTaskOutline.refresh", + "when": "view == bazelTaskOutline", + "group": "navigation@1" + } + ], + "view/item/context": [ + { + "command": "bazelTaskOutline.run", + "when": "view == bazelTaskOutline && viewItem == task", + "group": "inline@1" + }, + { + "command": "bazelTaskOutline.kill", + "when": "view == bazelTaskOutline && viewItem == runningTask", + "group": "inline@2" + } ] } }, @@ -109,8 +347,7 @@ "vsce:package": "npx vsce package --no-dependencies" }, "extensionDependencies": [ - "redhat.java", - "sfdc-eng.bazel-vscode" + "redhat.java" ], "devDependencies": { "@types/glob": "^8.1.0", @@ -143,5 +380,15 @@ "tsx": "^4.6.0", "typescript": "^5.3.0", "vscode-languageclient": "^9.0.1" + }, + "dependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/exporter-metrics-otlp-proto": "^0.203.0", + "@opentelemetry/exporter-trace-otlp-proto": "^0.203.0", + "@opentelemetry/resources": "^2.0.1", + "@opentelemetry/sdk-metrics": "^2.0.1", + "@opentelemetry/sdk-trace-web": "^2.0.1", + "@opentelemetry/semantic-conventions": "^1.36.0", + "fast-xml-parser": "^4.4.1" } } diff --git a/src/bazelLangaugeServerTerminal.ts b/src/bazelLangaugeServerTerminal.ts new file mode 100644 index 0000000..2d91dba --- /dev/null +++ b/src/bazelLangaugeServerTerminal.ts @@ -0,0 +1,77 @@ +import { Writable } from 'stream'; +import { Terminal, window, workspace } from 'vscode'; +import { BazelTerminal } from './bazelTerminal'; + +const BAZEL_TERMINAL_NAME = 'Bazel Build Status'; + +export namespace BazelLanguageServerTerminal { + export function stream(): Writable { + const s = new Writable(); + s._write = (chunk: Buffer, encoding, next) => { + getBazelTerminal().sendText(chunk.toString()); + next(); + }; + s.on('unpipe', () => s.end()); + + return s; + } + + // good reference if you want to change any colors https://misc.flogisoft.com/bash/tip_colors_and_formatting + export function info(msg: string) { + getBazelTerminal().sendText(`\u001b[32m${msg}\u001b[0m`); + } // green + export function warn(msg: string) { + if (getLogLevel() >= LogLevel.WARN) { + getBazelTerminal().sendText(`\u001b[33m${msg}\u001b[0m`); + } + } // yellow + export function debug(msg: string) { + if (getLogLevel() >= LogLevel.WARN) { + getBazelTerminal().sendText(`\u001b[34m${msg}\u001b[0m`); + } + } // blue + export function error(msg: string) { + getBazelTerminal().sendText(`\u001b[31m${msg}\u001b[0m`); + } // red + export function trace(msg: string) { + if (getLogLevel() >= LogLevel.WARN) { + getBazelTerminal().sendText(`\u001b[37m${msg}\u001b[0m`); + } + } // gray +} + +export function getBazelTerminal(): Terminal { + const term = window.terminals.find( + (term) => term.name === BAZEL_TERMINAL_NAME + ); + if (!term) { + return window.createTerminal({ + name: BAZEL_TERMINAL_NAME, + pty: new BazelTerminal(), + }); + } + return term; +} + +enum LogLevel { + INFO, + ERROR = 0, + WARN = 1, + DEBUG = 2, + TRACE = 3, +} + +function getLogLevel(): LogLevel { + const levelVal = workspace.getConfiguration('java.bazel').get('log.level'); + + switch (levelVal) { + case 'debug': + return LogLevel.DEBUG; + case 'warn': + return LogLevel.WARN; + case 'trace': + return LogLevel.TRACE; + default: + return LogLevel.INFO; + } +} diff --git a/src/bazelRunStatus.ts b/src/bazelRunStatus.ts new file mode 100644 index 0000000..018f25f --- /dev/null +++ b/src/bazelRunStatus.ts @@ -0,0 +1,15 @@ +import { StatusBarAlignment, ThemeColor, window } from 'vscode'; +import { Commands } from './commands'; + +export namespace BazelRunStatus { + const bazelStatus = window.createStatusBarItem(StatusBarAlignment.Left, 1); + + bazelStatus.command = Commands.OPEN_BAZEL_BUILD_STATUS_CMD; + bazelStatus.text = `$(sync~spin) bazel building`; + bazelStatus.backgroundColor = new ThemeColor( + 'statusBarItem.warningBackground' + ); + + export const show = () => bazelStatus.show(); + export const hide = () => bazelStatus.hide(); +} diff --git a/src/bazelTaskManager.ts b/src/bazelTaskManager.ts new file mode 100644 index 0000000..2ccbbdc --- /dev/null +++ b/src/bazelTaskManager.ts @@ -0,0 +1,19 @@ +import { tasks } from 'vscode'; +import { + BazelRunTarget, + BazelRunTargetProvider, +} from './provider/bazelRunTargetProvider'; + +export namespace BazelTaskManager { + export function refreshTasks() { + BazelRunTargetProvider.instance.refresh(); + } + + export function runTask(bazelTarget: BazelRunTarget) { + tasks.executeTask(bazelTarget.task!); + } + + export function killTask(bazelTarget: BazelRunTarget) { + bazelTarget.execution?.terminate(); + } +} diff --git a/src/bazelTerminal.ts b/src/bazelTerminal.ts new file mode 100644 index 0000000..7caba54 --- /dev/null +++ b/src/bazelTerminal.ts @@ -0,0 +1,40 @@ +import { + Event, + EventEmitter, + Pseudoterminal, + TerminalDimensions, +} from 'vscode'; + +let backtickHighlight = true; + +export class BazelTerminal implements Pseudoterminal { + private writeEmitter = new EventEmitter(); + + onDidWrite = this.writeEmitter.event; + onDidOverrideDimensions?: Event | undefined; + onDidClose?: Event | undefined; + onDidChangeName?: Event | undefined; + + open(initialDimensions: TerminalDimensions | undefined): void { + this.writeEmitter.fire(''); + } + close(): void { + this.writeEmitter.dispose(); + } + async handleInput?(data: string): Promise { + this.writeEmitter.fire( + data + .replace(/\"/g, '\\"') + .replace(/\`/g, highlightBacktick) + .replace(/(\r|\n)+/g, '\r\n') + ); + } +} + +function highlightBacktick(substring: string, ...args: any[]): string { + backtickHighlight = !backtickHighlight; + if (backtickHighlight) { + return '\u001b[0m'; + } + return '\u001b[33m'; +} diff --git a/src/bazelprojectparser.ts b/src/bazelprojectparser.ts new file mode 100644 index 0000000..5c4f5ce --- /dev/null +++ b/src/bazelprojectparser.ts @@ -0,0 +1,188 @@ +import { existsSync, readFileSync } from 'fs'; +import { FileType, Uri, workspace } from 'vscode'; +import { BazelLanguageServerTerminal } from './bazelLangaugeServerTerminal'; +import { BazelProjectView, ParseConfig, RawSection } from './types'; +import { getWorkspaceRoot } from './util'; + +const COMMENT_REGEX = /#(.)*(\n|\z)/gm; +const HEADER_REGEX = /^[^:\-\/*\s]+[: ]/gm; +const WHITESPACE_CHAR_REGEX = /\s+/; +const EXCLUDED_ENTRY_PREFIX = '-'; + +function parseProjectFile(config: ParseConfig): BazelProjectView { + let current: string | undefined; + while ((current = config.imports.pop())) { + const filePath = `${config.root}/${current}`; + if (existsSync(filePath)) { + if (config.processedImports.includes(current)) { + throw new Error( + `Recursive import detected for file ${current}, ${config.processedImports.join( + '-> ' + )}` + ); + } + config.processedImports.push(current); + + let fileContent = readFileSync(filePath, { encoding: 'utf-8' }); + fileContent = removeComments(fileContent); + + const rawSections = parseRawSections(fileContent).forEach((section) => { + switch (section.name) { + case 'directories': + config.projectView.directories = Array.from( + new Set( + config.projectView.directories.concat( + parseAsList(section.body).filter( + (s) => !s.startsWith(EXCLUDED_ENTRY_PREFIX) + ) + ) + ) + ); + break; + case 'targets': + config.projectView.targets = Array.from( + new Set( + config.projectView.targets.concat( + parseAsList(section.body).filter( + (s) => !s.startsWith(EXCLUDED_ENTRY_PREFIX) + ) + ) + ) + ); + break; + case 'import': + config.imports = config.imports.concat(parseAsList(section.body)); + break; + case 'derive_targets_from_directories': + config.projectView.deriveTargetsFromDirectories = parseAsBoolean( + section.body + ); + break; + case 'workspace_type': + config.projectView.workspaceType = section.body; + break; + case 'additional_languages': + config.projectView.additionalLanguages = Array.isArray( + config.projectView.additionalLanguages + ) + ? config.projectView.additionalLanguages.concat( + parseAsList(section.body) + ) + : parseAsList(section.body); + break; + case 'java_language_level': + config.projectView.javaLanguageLevel = section.body; + break; + case 'ts_config_rules': + config.projectView.tsConfigRules = Array.isArray( + config.projectView.tsConfigRules + ) + ? config.projectView.tsConfigRules.concat( + parseAsList(section.body) + ) + : parseAsList(section.body); + break; + case 'import_run_configurations': + config.projectView.importRunConfigurations = Array.isArray( + config.projectView.importRunConfigurations + ) + ? config.projectView.importRunConfigurations.concat( + parseAsList(section.body) + ) + : parseAsList(section.body); + break; + case 'bazel_binary': + config.projectView.bazelBinary = section.body; + break; + case 'project_mappings': + config.projectView.projectMappings = Array.isArray( + config.projectView.projectMappings + ) + ? config.projectView.projectMappings.concat(section.body) + : parseAsList(section.body); + break; + case 'target_discovery_strategy': + config.projectView.targetDiscoveryStrategy = section.body; + break; + case 'target_provisioning_strategy': + config.projectView.targetProvisioningStrategy = section.body; + break; + default: + BazelLanguageServerTerminal.warn( + `unexpected section '${section.name}' while reading '${current}'` + ); + } + }); + } else { + BazelLanguageServerTerminal.warn(`unable to resolve import ${current}`); + } + } + + return config.projectView; +} + +function parseAsList(value: string): string[] { + return value.split(WHITESPACE_CHAR_REGEX).filter((v) => v !== ''); +} + +function parseAsBoolean(value: string) { + return /true/i.test(value); +} + +function parseRawSections(projectFileContents: string): RawSection[] { + const result = new Array(); + + const headers = projectFileContents + .match(HEADER_REGEX) + ?.map((h) => h.replace(':', '')) + ?.map((h) => h.trim()); + + const bodies = projectFileContents.split(HEADER_REGEX); + + if (headers?.length !== bodies.length - 1) { + throw new Error( + `Syntax error in .bazelproject: The number of section headers doesn't match the number of section bodies (${headers?.length} != ${ + bodies.length + }; header: ${headers?.join(',')}).` + ); + } + + headers.forEach((value, idx) => + result.push({ name: value, body: bodies[idx + 1].trim() }) + ); + + return result; +} + +function removeComments(bazelProjectFileContent: string): string { + return bazelProjectFileContent.replace(COMMENT_REGEX, '\n'); +} + +export async function getBazelProjectFile(): Promise { + try { + const bazelProjectFileStat = await workspace.fs.stat( + Uri.parse(`${getWorkspaceRoot()}/.eclipse/.bazelproject`) + ); + if (bazelProjectFileStat.type === FileType.File) { + return readBazelProject(`.eclipse/.bazelproject`); + } + throw new Error( + `.eclipse/.bazelproject type is ${bazelProjectFileStat.type}, should be ${FileType.File}` + ); + } catch (err) { + throw new Error(`Could not read .eclipse/.bazelproject file: ${err}`); + } +} + +export function readBazelProject(bazelProjectFile: string): BazelProjectView { + return parseProjectFile({ + root: getWorkspaceRoot(), + imports: [bazelProjectFile], + projectView: { + directories: [], + targets: [], + deriveTargetsFromDirectories: false, + }, + processedImports: [], + }); +} diff --git a/src/buildifier.ts b/src/buildifier.ts new file mode 100644 index 0000000..8f44c07 --- /dev/null +++ b/src/buildifier.ts @@ -0,0 +1,99 @@ +import { exec } from 'child_process'; +import { + languages, + Range, + TextDocument, + TextEdit, + window, + workspace, +} from 'vscode'; +import { getWorkspaceRoot } from './util'; + +export function registerBuildifierFormatter() { + languages.registerDocumentFormattingEditProvider( + { scheme: 'file', language: 'starlark' }, + { + async provideDocumentFormattingEdits( + document: TextDocument + ): Promise { + if ( + workspace.getConfiguration('bazel.buildifier').get('enable', false) + ) { + try { + if (await buildifierExists()) { + const updatedContent = await runBuildifier(document.fileName); + + // only return an edit if there is a value in `updatedContent` + return !!updatedContent + ? [ + TextEdit.replace( + new Range( + 0, + 0, + document.lineCount - 1, + document.lineAt( + document.lineCount - 1 + ).rangeIncludingLineBreak.end.character + ), + updatedContent + ), + ] + : []; + } + } catch (err) { + window.showErrorMessage(`${err}`); + return []; + } + } + + return []; + }, + } + ); +} + +function buildifierExists(): Promise { + return new Promise((resolve, reject) => { + exec( + `${getBuildifierCmd()} -version`, + { cwd: getWorkspaceRoot() }, + (err, stdout, stderr) => { + if (err) { + return reject(err); + } + return resolve(!stderr); + } + ); + }); +} + +/** + * Utility function used to fetch the formatted text from the `buildifier` + * cmd. Uses `exec` since we want to get all of the cmd response in a single + * text blob + * @param bazelFile + * @returns + */ +function runBuildifier(bazelFile: string): Promise { + return new Promise((resolve, reject) => { + exec( + `${getBuildifierCmd()} -mode print_if_changed ${workspace.asRelativePath(bazelFile)}`, + { + cwd: getWorkspaceRoot(), + }, + (err, stdout, stderr) => { + if (err) { + console.error(stderr); + return reject(err); + } + return resolve(stdout); + } + ); + }); +} + +function getBuildifierCmd(): string { + return workspace.getConfiguration('bazel.buildifier').get('binary') + ? workspace.getConfiguration('bazel.buildifier').get('binary', 'buildifier') + : 'buildifier'; +} diff --git a/src/commands.ts b/src/commands.ts index db214b5..086ac6d 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -16,6 +16,8 @@ export namespace Commands { * Synchronize all projects of a Bazel workspace */ export const SYNC_PROJECTS = 'java.bazel.syncProjects'; + export const SYNC_PROJECTS_CMD = 'java.bazel.syncProjects.command'; + export const SYNC_DIRECTORIES_ONLY = 'java.bazel.syncDirectoriesOnly.command'; /** * Connect our output window @@ -34,6 +36,16 @@ export namespace Commands { export const GET_ALL_JAVA_PROJECTS = 'java.project.getAll'; export const DEBUG_LS_CMD = 'java.bazel.debug.command'; + + export const OPEN_BAZEL_BUILD_STATUS_CMD = 'java.bazel.showStatus'; + + export const BAZEL_TARGET_REFRESH = 'bazelTaskOutline.refresh'; + export const BAZEL_TARGET_RUN = 'bazelTaskOutline.run'; + export const BAZEL_TARGET_KILL = 'bazelTaskOutline.kill'; + + export const OPEN_BAZEL_PROJECT_FILE = 'bazel.projectview.open'; + + export const CONVERT_PROJECT_WORKSPACE = 'bazel.convert.workspace'; } export function executeJavaLanguageServerCommand( diff --git a/src/extension.api.ts b/src/extension.api.ts index 9e1b1ce..876b1c3 100644 --- a/src/extension.api.ts +++ b/src/extension.api.ts @@ -1,20 +1,5 @@ -import { Writable } from 'stream'; import { BazelProjectView } from './types'; -export interface BazelJavaExtensionAPI { - readonly sync: Function; -} - export interface BazelVscodeExtensionAPI { readonly parseProjectFile: BazelProjectView; - readonly bazelTerminal: BazelServerTerminal; -} - -export interface BazelServerTerminal { - stream(): Writable; - info(msg: string): void; - warn(msg: string): void; - debug(msg: string): void; - error(msg: string): void; - trace(msg: string): void; } diff --git a/src/extension.ts b/src/extension.ts index 2ad2af9..5860c1d 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,51 +1,186 @@ -import { setTimeout } from 'timers/promises'; +import { Span } from '@opentelemetry/api'; +import { existsSync, mkdirSync, writeFileSync } from 'fs'; +import { dirname, join } from 'path'; import { format } from 'util'; import { ExtensionContext, + ProgressLocation, + TextDocument, + Uri, commands, extensions, + tasks, window, workspace, } from 'vscode'; -import { Commands, executeJavaLanguageServerCommand } from './commands'; import { - BazelJavaExtensionAPI, - BazelVscodeExtensionAPI, -} from './extension.api'; + BazelLanguageServerTerminal, + getBazelTerminal, +} from './bazelLangaugeServerTerminal'; +import { getBazelProjectFile } from './bazelprojectparser'; +import { BazelTaskManager } from './bazelTaskManager'; +import { registerBuildifierFormatter } from './buildifier'; +import { Commands, executeJavaLanguageServerCommand } from './commands'; +import { BazelVscodeExtensionAPI } from './extension.api'; import { registerLSClient } from './loggingTCPServer'; -import { outputLog } from './util'; +import { ProjectViewManager } from './projectViewManager'; +import { BazelRunTargetProvider } from './provider/bazelRunTargetProvider'; +import { getModuleBuildFile } from './provider/bazelSyncStatusProvider'; +import { BazelTaskProvider } from './provider/bazelTaskProvider'; +import { ExtensionOtel, registerMetrics } from './tracing/otelUtils'; +import { + getWorkspaceRoot, + initBazelProjectFile, + isBazelWorkspaceRoot, +} from './util'; -const BAZEL_EXTENSION_NAME = 'sfdc-eng.bazel-vscode'; +const workspaceRoot = getWorkspaceRoot(); export async function activate( context: ExtensionContext -): Promise { - const bazelExtension = - extensions.getExtension( - BAZEL_EXTENSION_NAME - )?.exports; +): Promise { + // activates + // LS processes current .eclipse/.bazelproject file + // if it DNE create one + // register TCP port with LS + // project view should reflect what's in the LS + // show any directories listed in the .bazelproject file + // fetch all projects loaded into LS and display those as well + // show .eclipse folder + // - if (bazelExtension) { - // always update the project view after the initial project load - registerLSClient(bazelExtension.bazelTerminal); + // Write java.bazel.enabled configuration to file for JDTLS layer + writeBazelEnabledConfig(); - context.subscriptions.push( - commands.registerCommand(Commands.UPDATE_CLASSPATHS_CMD, updateClasspaths) + const enabled = workspace + .getConfiguration('java.bazel-vscode') + .get('enabled'); + if (!enabled) { + BazelLanguageServerTerminal.info( + 'Bazel VSCode extension for Java is disabled. To enable it, set "java.bazel-vscode.enabled" to true in your settings.' ); + return Promise.resolve({ + parseProjectFile: await getBazelProjectFile(), + }); + } + + registerMetrics(context); + + window.registerTreeDataProvider( + 'bazelTaskOutline', + BazelRunTargetProvider.instance + ); + tasks.registerTaskProvider('bazel', new BazelTaskProvider()); + + BazelLanguageServerTerminal.trace('extension activated'); + + workspace.onDidSaveTextDocument((doc) => { + if (doc.fileName.includes('bazelproject')) { + toggleBazelProjectSyncStatus(doc); + } + }); + + context.subscriptions.push( + commands.registerCommand( + Commands.OPEN_BAZEL_BUILD_STATUS_CMD, + getBazelTerminal().show + ) + ); + + commands.executeCommand( + 'setContext', + 'isBazelWorkspaceRoot', + isBazelWorkspaceRoot() + ); + commands.executeCommand( + 'setContext', + 'isMultiRoot', + workspace.workspaceFile?.fsPath.includes('code-workspace') + ); + // create .eclipse/.bazelproject file if DNE + if (isBazelWorkspaceRoot()) { + initBazelProjectFile(); + const showBazelprojectConfig = + workspace.getConfiguration('bazel.projectview'); + if (showBazelprojectConfig.get('open')) { + openBazelProjectFile(); + showBazelprojectConfig.update('open', false); // only open this file on the first activation of this extension + } + syncProjectViewDirectories(); context.subscriptions.push( - commands.registerCommand(Commands.DEBUG_LS_CMD, runLSCmd) + commands.registerCommand(Commands.OPEN_BAZEL_PROJECT_FILE, () => + openBazelProjectFile() + ) ); } + context.subscriptions.push( + commands.registerCommand(Commands.SYNC_PROJECTS_CMD, syncProjectView) + ); + context.subscriptions.push( + commands.registerCommand( + Commands.SYNC_DIRECTORIES_ONLY, + syncProjectViewDirectories + ) + ); + context.subscriptions.push( + commands.registerCommand(Commands.UPDATE_CLASSPATHS_CMD, updateClasspaths) + ); + context.subscriptions.push( + commands.registerCommand(Commands.DEBUG_LS_CMD, runLSCmd) + ); + context.subscriptions.push( + commands.registerCommand( + Commands.BAZEL_TARGET_REFRESH, + BazelTaskManager.refreshTasks + ) + ); + context.subscriptions.push( + commands.registerCommand( + Commands.BAZEL_TARGET_RUN, + BazelTaskManager.runTask + ) + ); + context.subscriptions.push( + commands.registerCommand( + Commands.BAZEL_TARGET_KILL, + BazelTaskManager.killTask + ) + ); + + context.subscriptions.push( + commands.registerCommand( + Commands.CONVERT_PROJECT_WORKSPACE, + ProjectViewManager.covertToMultiRoot + ) + ); + + registerBuildifierFormatter(); + + // trigger a refresh of the tree view when any task get executed + tasks.onDidStartTask((_) => BazelRunTargetProvider.instance.refresh()); + tasks.onDidEndTask((_) => BazelRunTargetProvider.instance.refresh()); + + // always update the project view after the initial project load + registerLSClient(); + + ExtensionOtel.getInstance(context).tracer.startActiveSpan( + 'extension.activation', + (span: Span) => { + span.addEvent('activation success'); + span.end(); + } + ); + return Promise.resolve({ - sync: syncProjectView, + parseProjectFile: await getBazelProjectFile(), }); } export function deactivate() {} -async function syncProjectView(): Promise { - if (!(await isRedhatJavaReady(true))) { +function syncProjectView(): void { + if (!isRedhatJavaReady()) { window.showErrorMessage( 'Unable to sync project view. Java language server is not ready' ); @@ -63,20 +198,93 @@ async function syncProjectView(): Promise { .then(() => commands.executeCommand('workbench.action.reloadWindow')); } - executeJavaLanguageServerCommand(Commands.SYNC_PROJECTS); + executeJavaLanguageServerCommand(Commands.SYNC_PROJECTS).then( + syncProjectViewDirectories + ); } -async function updateClasspaths() { - if (!(await isRedhatJavaReady(true))) { +function updateClasspaths(moduleBuildFile?: Uri) { + if (!isRedhatJavaReady()) { window.showErrorMessage( 'Unable to update classpath. Java language server is not ready' ); return; } + + // Get BUILD file URI + const buildFileUri = getBuildFileUri(moduleBuildFile); + if (!buildFileUri) { + return; // Error already shown in getBuildFileUri + } + + // Show progress notification + window.withProgress( + { + location: ProgressLocation.Notification, + title: 'Refreshing classpath', + cancellable: false, + }, + async (progress) => { + progress.report({ message: 'Updating classpath from BUILD file...' }); + + try { + await executeJavaLanguageServerCommand( + Commands.UPDATE_CLASSPATHS, + buildFileUri.toString() + ); + + window.showInformationMessage( + 'Classpath refresh completed successfully.' + ); + } catch (error) { + const errorMessage = + error instanceof Error ? error.message : String(error); + window.showErrorMessage(`Failed to refresh classpath: ${errorMessage}`); + } + } + ); +} + +/** + * Gets the BUILD file Uri from various sources. + * Returns undefined if no valid BUILD file can be found (and shows error message). + */ +function getBuildFileUri(moduleBuildFile?: Uri): Uri | undefined { + // If moduleBuildFile is provided, return it directly + if (moduleBuildFile) { + return moduleBuildFile; + } + + // Otherwise, try to find BUILD file from active editor + const activeEditor = window.activeTextEditor; + if (!activeEditor) { + window.showErrorMessage( + 'No BUILD file selected. Please open a BUILD file or select one in the explorer.' + ); + return undefined; + } + + const activeFileUri = activeEditor.document.uri; + + // If current file is a BUILD file, use it + if (activeFileUri.fsPath.includes('BUILD')) { + return activeFileUri; + } + + // Otherwise, search for BUILD file in parent directories + try { + const buildFilePath = getModuleBuildFile(dirname(activeFileUri.fsPath)); + return Uri.file(buildFilePath); + } catch (error) { + window.showErrorMessage( + 'No BUILD file found in the current directory or parent directories.' + ); + return undefined; + } } -async function runLSCmd() { - if (!(await isRedhatJavaReady(true))) { +function runLSCmd() { + if (!isRedhatJavaReady()) { window.showErrorMessage( 'Unable to execute LS cmd. Java language server is not ready' ); @@ -90,26 +298,98 @@ async function runLSCmd() { if (cmd) { const [lsCmd, args] = cmd.trim().split(/\s(.*)/s); executeJavaLanguageServerCommand(lsCmd, args).then( - (resp) => outputLog.info(format(resp)), - (err) => outputLog.error(format(err)) + (resp) => BazelLanguageServerTerminal.info(format(resp)), + (err) => BazelLanguageServerTerminal.error(format(err)) ); } }); } -async function isRedhatJavaReady(wait = false, retry = 5): Promise { +function isRedhatJavaReady(): boolean { const javaExtension = extensions.getExtension('redhat.java')?.exports; - if (javaExtension) { - if (javaExtension.status === 'Started') { - return true; - } + return javaExtension.status === 'Started'; } + return false; +} - if (wait) { - await setTimeout(1000); - return isRedhatJavaReady(true, retry - 1); +function toggleBazelProjectSyncStatus(doc: TextDocument) { + if (workspace.getConfiguration('bazel.projectview').get('notification')) { + window + .showWarningMessage( + `The Bazel Project View changed. Do you want to synchronize? [details](https://github.com/salesforce/bazel-eclipse/blob/main/docs/common/projectviews.md#project-views)`, + ...['Java Projects', 'Only Directories', 'Do Nothing'] + ) + .then((val) => { + if (val === 'Java Projects') { + syncProjectView(); + } else if (val === 'Only Directories') { + syncProjectViewDirectories(); + } else if (val === 'Do Nothing') { + workspace + .getConfiguration('bazel.projectview') + .update('notification', false); + } + }); } +} - return false; +function syncProjectViewDirectories() { + ProjectViewManager.updateProjectView(); +} + +function openBazelProjectFile() { + try { + const projectViewPath = join(workspaceRoot, '.eclipse', '.bazelproject'); + if (existsSync(projectViewPath)) { + workspace + .openTextDocument(projectViewPath) + .then((f) => window.showTextDocument(f)); + } else { + window.showErrorMessage(`${projectViewPath} does not exist`); + } + } catch (err) { + window.showErrorMessage( + 'Unable to open the bazel project file; invalid workspace' + ); + } +} + +/** + * Writes the java.bazel.enabled configuration to a file that JDTLS layer can read. + * This allows conditional activation of Bazel Java support based on workspace type. + */ +function writeBazelEnabledConfig() { + try { + // Read the java.bazel.enabled configuration + const config = workspace.getConfiguration('java.bazel'); + const enabled = config.get('enabled', false); + + // Ensure we have a workspace root + if (!workspaceRoot) { + BazelLanguageServerTerminal.trace( + 'No workspace root found, skipping Bazel enabled config write' + ); + return; + } + + // Create .vscode directory if it doesn't exist + const vscodeDir = join(workspaceRoot, '.vscode'); + if (!existsSync(vscodeDir)) { + mkdirSync(vscodeDir, { recursive: true }); + } + + // Write the configuration file + const configFile = join(vscodeDir, '.bazel-java-enabled'); + writeFileSync(configFile, enabled.toString(), 'utf8'); + + BazelLanguageServerTerminal.trace( + `Bazel Java support: ${enabled ? 'enabled' : 'disabled'}` + ); + } catch (error) { + // Log error but don't fail activation + BazelLanguageServerTerminal.error( + `Failed to write Bazel enabled state: ${error}` + ); + } } diff --git a/src/loggingTCPServer.ts b/src/loggingTCPServer.ts index 1ee6853..ba97a46 100644 --- a/src/loggingTCPServer.ts +++ b/src/loggingTCPServer.ts @@ -1,8 +1,8 @@ import { AddressInfo, Server, Socket, createServer } from 'net'; import { setTimeout } from 'timers/promises'; import { commands, workspace } from 'vscode'; +import { BazelLanguageServerTerminal } from './bazelLangaugeServerTerminal'; import { Commands } from './commands'; -import { BazelServerTerminal } from './extension.api'; const SERVER_START_RETRIES = 10; const PORT_REGISTRATION_RETRIES = 10; @@ -10,10 +10,7 @@ const RETRY_INTERVAL = 5000; // ms let server: Server | undefined; -function startTCPServer( - bazelTerminal: BazelServerTerminal, - attempts = 0 -): Promise { +function startTCPServer(attempts = 0): Promise { let port = 0; if (workspace.getConfiguration('java').has('jdt.ls.vmargs')) { const vmargs = workspace @@ -34,13 +31,13 @@ function startTCPServer( server = createServer((sock: Socket) => { attempts = 0; - sock.pipe(bazelTerminal.stream()); + sock.pipe(BazelLanguageServerTerminal.stream()); sock.on('end', () => { - sock.unpipe(bazelTerminal.stream()); + sock.unpipe(BazelLanguageServerTerminal.stream()); }); sock.on('error', (err: Error) => { - bazelTerminal.error(err.message); + BazelLanguageServerTerminal.error(err.message); sock.end(); }); }); @@ -50,38 +47,38 @@ function startTCPServer( const address = server.address(); if (address) { const port = (address as AddressInfo).port; - bazelTerminal.debug(`Bazel log server listening on port ${port}`); + BazelLanguageServerTerminal.debug( + `Bazel log server listening on port ${port}` + ); resolve(port); } } else { - bazelTerminal.error(`Failed to start bazel TCP server`); + BazelLanguageServerTerminal.error(`Failed to start bazel TCP server`); setTimeout(1000 * attempts).then(() => - startTCPServer(bazelTerminal, attempts + 1) + startTCPServer(attempts + 1) ); } }); server.on('error', (err: Error) => { console.error(err.message); - bazelTerminal.error(err.message); + BazelLanguageServerTerminal.error(err.message); }); }); } -export function registerLSClient( - bazelTerminal: BazelServerTerminal -): Promise { - bazelTerminal.info('java LS registering'); - return startTCPServer(bazelTerminal) - .then((port) => registerPortWithLanguageServer(port, bazelTerminal)) +export function registerLSClient(): Promise { + return startTCPServer() + .then((port) => registerPortWithLanguageServer(port)) .catch((err) => - bazelTerminal.error(`Failed to register port with BLS: ${err.message}`) + BazelLanguageServerTerminal.error( + `Failed to register port with BLS: ${err.message}` + ) ); } async function registerPortWithLanguageServer( port: number, - bazelTerminal: BazelServerTerminal, attempts = 0, maxRetries = 50 ): Promise { @@ -94,7 +91,9 @@ async function registerPortWithLanguageServer( Commands.REGISTER_BAZEL_TCP_SERVER_PORT, port ) - .then(() => bazelTerminal.trace(`port ${port} registered with BLS`)); + .then(() => + BazelLanguageServerTerminal.trace(`port ${port} registered with BLS`) + ); } catch (err) { error = err; console.error(`register port failed ${attempts} : ${err}`); diff --git a/src/projectViewManager.ts b/src/projectViewManager.ts new file mode 100644 index 0000000..ecc2e53 --- /dev/null +++ b/src/projectViewManager.ts @@ -0,0 +1,256 @@ +import { writeFileSync } from 'fs'; +import { sep } from 'path'; +import { + commands, + ConfigurationTarget, + FileType, + Uri, + window, + workspace, +} from 'vscode'; +import { BazelLanguageServerTerminal } from './bazelLangaugeServerTerminal'; +import { getBazelProjectFile } from './bazelprojectparser'; +import { ExcludeConfig, FileWatcherExcludeConfig } from './types'; +import { getVscodeConfig, getWorkspaceRoot } from './util'; + +export namespace ProjectViewManager { + const workspaceRoot = getWorkspaceRoot(); + const workspaceRootName = getWorkspaceRootName(); + + function getWorkspaceRootName(): string { + const name = workspaceRoot.split('/').reverse()[0]; + if (!name || name.trim() === '') { + throw new Error( + `Invalid workspace root path, cannot extract name: ${workspaceRoot}` + ); + } + return name; + } + + export function isMultiRoot(): boolean { + return !!workspace.workspaceFile; + } + + /** + * Utility method to convert a single root workspace to a multi-root + */ + export function covertToMultiRoot() { + if (!isMultiRoot()) { + window + .showWarningMessage( + 'This will convert your project to a multi-root project. After this operation completes your window will be reloaded', + 'Proceed', + 'Cancel' + ) + .then(async (action) => { + if (action === 'Proceed') { + const workspaceFile = { + folders: [{ path: '.eclipse' }], + settings: await getVscodeConfig('settings').then(cleanSettings), + launch: await getVscodeConfig('launch'), + tasks: await getVscodeConfig('tasks'), + extensions: await getVscodeConfig('extensions'), + }; + writeFileSync( + `${workspaceRoot}/workspace.code-workspace`, + JSON.stringify(workspaceFile, null, 2) + ); + + // cleanup all old single root workspace files + await workspace.fs.delete(Uri.file(`${workspaceRoot}/.vscode`), { + recursive: true, + }); + + // reload the window using the new workspace + commands.executeCommand( + 'vscode.openFolder', + Uri.file(`${workspaceRoot}/workspace.code-workspace`) + ); + } + return; + }); + } else { + window.showInformationMessage( + 'This project is already in multi-root mode.' + ); + } + } + + export async function updateProjectView() { + BazelLanguageServerTerminal.debug('Syncing bazel project view'); + + getDisplayFolders().then((df) => { + if (isMultiRoot()) { + return updateMultiRootProjectView(df) + .then(rootDirOnly) + .then(updateFileWatcherExclusion); + } + return updateSingleRootProjectView(rootDirOnly(df)).then( + updateFileWatcherExclusion + ); + }); + } + + async function getDisplayFolders(): Promise { + let displayFolders = new Set(['.eclipse']); // TODO bubble this out to a setting + try { + const bazelProjectFile = await getBazelProjectFile(); + if (bazelProjectFile.directories.includes('.')) { + displayFolders = new Set(['.']); + } else { + bazelProjectFile.directories.forEach((d) => { + displayFolders.add(d); + }); + bazelProjectFile.targets.forEach((t) => + displayFolders.add( + t.replace('//', '').replace(/:.*/, '').replace(/\/.*/, '') + ) + ); + } + + return [...displayFolders]; + } catch (err) { + throw new Error(`Could not read bazelproject file: ${err}`); + } + } + + function updateSingleRootProjectView( + displayFolders: string[] + ): Thenable { + const viewAll = displayFolders.includes('.'); + const workspaceFilesConfig = workspace.getConfiguration('files'); + return workspace.fs + .readDirectory(Uri.parse(workspaceRoot)) + .then((val) => val.filter((x) => x[1] !== FileType.File).map((d) => d[0])) + .then((dirs) => { + const filesExclude = workspaceFilesConfig.get( + 'exclude' + ) as ExcludeConfig; + dirs.forEach( + (d) => + (filesExclude[d] = viewAll ? false : !displayFolders.includes(d)) + ); + return filesExclude; + }) + .then((filesExclude) => + workspaceFilesConfig.update( + 'exclude', + filesExclude, + ConfigurationTarget.Workspace + ) + ) + .then(() => displayFolders); + } + + function updateMultiRootProjectView( + displayFolders: string[] + ): Thenable { + // 1. workspaceRoot as the first workspace folder, so ${workspaceFolder} resolves to the real project path + // 2. Other subdirectories serve as quick access entries + const workspaceFoldersToAdd = [ + { uri: Uri.file(workspaceRoot), name: workspaceRootName }, + ...displayFolders + .filter((f) => f !== '.') // Exclude '.' since workspaceRoot already represents the root directory + .map((f) => ({ + uri: Uri.file(`${workspaceRoot}/${f}`), + name: f.replaceAll(sep, ' ⇾ '), + })), + ]; + workspace.updateWorkspaceFolders( + 0, + workspace.workspaceFolders?.length, + ...workspaceFoldersToAdd + ); + return Promise.resolve(displayFolders); + } + + function updateFileWatcherExclusion( + displayFolders: string[] + ): Thenable { + const workspaceFilesConfig = workspace.getConfiguration('files'); + BazelLanguageServerTerminal.debug('updating files.watcherExclude setting'); + + const filesWatcherExclude = + workspaceFilesConfig.get('watcherExclude', {}); + + const fileWatcherKeys = Object.keys(filesWatcherExclude); + const hasOldEntry = fileWatcherKeys.filter((k) => + k.includes('.eclipse') + ).length; + + const viewAll = displayFolders.includes('.') && !isMultiRoot(); + + const fileWatcherExcludePattern = viewAll + ? '' + : `**/!(${Array.from( + displayFolders + .filter((e) => e !== '') + .filter((s) => s !== '.') + .sort() + ).join('|')})/**`; + + if (viewAll) { + // if viewAll and existing config doesn't contain .eclipse return + if (!hasOldEntry) { + return Promise.resolve(); + } + } else { + // if !viewAll and existing config contains identical entry return + if (fileWatcherKeys.includes(fileWatcherExcludePattern)) { + return Promise.resolve(); + } + } + + // copy the old config obj, but remove any previous exclude based on the .bazelproject file + const newFilesWatcherExclude: FileWatcherExcludeConfig = {}; + for (const val in filesWatcherExclude) { + if (!val.includes('.eclipse')) { + newFilesWatcherExclude[val] = filesWatcherExclude[val]; + } + } + + if (fileWatcherExcludePattern) { + newFilesWatcherExclude[fileWatcherExcludePattern] = true; + } + + return workspaceFilesConfig + .update('watcherExclude', newFilesWatcherExclude) + .then((x) => + window + .showWarningMessage( + 'File watcher exclusions are out of date. Please reload the window to apply the change', + ...['Reload', 'Ignore'] + ) + .then((opt) => { + if (opt === 'Reload') { + commands.executeCommand('workbench.action.reloadWindow'); + } + if (opt === 'Ignore') { + workspace + .getConfiguration('bazel.projectview') + .update('updateFileWatcherExclusion', false); + } + }) + ); + } + + /** + * + * @param settingsObj used to clear the 'old' files.exclude entry that + * was used to modify the project view + * @returns + */ + function cleanSettings(settingsObj: Object | undefined): Object | undefined { + if (settingsObj) { + if ('files.exclude' in settingsObj) { + delete settingsObj['files.exclude']; + } + } + + return settingsObj; + } + + function rootDirOnly(dirs: string[]): string[] { + return dirs.map((d) => d.split('/')[0]); + } +} diff --git a/src/provider/bazelRunTargetProvider.ts b/src/provider/bazelRunTargetProvider.ts new file mode 100644 index 0000000..c439faf --- /dev/null +++ b/src/provider/bazelRunTargetProvider.ts @@ -0,0 +1,73 @@ +import { + Command, + Event, + EventEmitter, + ProviderResult, + Task, + TaskExecution, + ThemeIcon, + TreeDataProvider, + TreeItem, + TreeItemCollapsibleState, + tasks, +} from 'vscode'; + +export class BazelRunTargetProvider + implements TreeDataProvider +{ + private static _instance: BazelRunTargetProvider; + + private _onDidChangeTreeData: EventEmitter< + BazelRunTarget | undefined | void + > = new EventEmitter(); + readonly onDidChangeTreeData: Event = + this._onDidChangeTreeData.event; + + private constructor() {} + + public static get instance(): BazelRunTargetProvider { + if (!BazelRunTargetProvider._instance) { + BazelRunTargetProvider._instance = new BazelRunTargetProvider(); + } + return BazelRunTargetProvider._instance; + } + + refresh(...args: any[]): void { + this._onDidChangeTreeData.fire(); + } + + getTreeItem(element: BazelRunTarget): TreeItem | Thenable { + return element; + } + getChildren( + element?: BazelRunTarget | undefined + ): ProviderResult { + return tasks + .fetchTasks({ type: 'bazel' }) + .then((bt) => + bt.map((t) => new BazelRunTarget(t, TreeItemCollapsibleState.None)) + ); + } +} + +export class BazelRunTarget extends TreeItem { + public readonly task: Task | undefined; + public readonly execution: TaskExecution | undefined; + + constructor( + task: Task, + collapsibleState: TreeItemCollapsibleState, + command?: Command + ) { + super(task.name, collapsibleState); + this.task = task; + this.command = command; + this.execution = tasks.taskExecutions.find( + (e) => e.task.name === this.task?.name && e.task.source === task.source + ); + this.contextValue = this.execution ? 'runningTask' : 'task'; + if (this.execution) { + this.iconPath = new ThemeIcon('sync~spin'); + } + } +} diff --git a/src/provider/bazelSyncStatusProvider.ts b/src/provider/bazelSyncStatusProvider.ts new file mode 100644 index 0000000..552122d --- /dev/null +++ b/src/provider/bazelSyncStatusProvider.ts @@ -0,0 +1,158 @@ +import { existsSync, lstatSync, readdirSync } from 'fs'; +import * as path from 'path'; +import { + CancellationToken, + Command, + Event, + EventEmitter, + FileSystemWatcher, + ProviderResult, + RelativePattern, + TreeDataProvider, + TreeItem, + TreeItemCollapsibleState, + Uri, + window, + workspace, +} from 'vscode'; +import { Commands, executeJavaLanguageServerCommand } from '../commands'; +import { UpdateClasspathResponse } from '../types'; + +const SYNCED = 'synced'; +const UNSYNCED = 'unsynced'; + +export class BazelSyncStatusProvider implements TreeDataProvider { + private _onDidChangeTreeData: EventEmitter = + new EventEmitter(); + readonly onDidChangeTreeData: Event = + this._onDidChangeTreeData.event; + private treeData: SyncStatus[] = []; + + constructor(private workspaceRoot: string | undefined) { + this.workspaceRoot = workspaceRoot; + } + + refresh(): void { + this._onDidChangeTreeData.fire(); + } + + getTreeItem(element: SyncStatus): TreeItem | Thenable { + return element; + } + getChildren(element?: SyncStatus | undefined): ProviderResult { + if (!this.workspaceRoot) { + window.showInformationMessage('empty workspace'); + return Promise.resolve([]); + } + + // we never have children of children, so we only care about the case where no element is passed in + if (!element) { + if (!this.treeData || !this.treeData.length) { + return this.buildTreeData(); + } + + return Promise.resolve(this.treeData); + } + + return Promise.resolve([]); + } + getParent?(element: SyncStatus): ProviderResult { + throw new Error('Method not implemented.'); + } + resolveTreeItem?( + item: TreeItem, + element: SyncStatus, + token: CancellationToken + ): ProviderResult { + throw new Error('Method not implemented.'); + } + + buildTreeData(): Promise { + return new Promise((resolve, reject) => { + executeJavaLanguageServerCommand( + Commands.JAVA_LS_LIST_SOURCEPATHS + ).then( + (resp) => { + this.treeData = resp.data.map((cp) => { + const moduleBuildFilePath = getModuleBuildFile(cp.path); + const moduleBuildFileUri = Uri.file(moduleBuildFilePath); + return new SyncStatus( + cp.projectName, + workspace.createFileSystemWatcher( + new RelativePattern(path.dirname(moduleBuildFilePath), 'BUILD*') + ), + TreeItemCollapsibleState.None, + { + title: 'sync module', + command: Commands.UPDATE_CLASSPATHS_CMD, + arguments: [moduleBuildFileUri], + } + ); + }); + resolve(this.treeData); + }, + (err) => reject(err) + ); + }); + } + + clearTreeData() { + this.treeData.forEach((td) => { + td.watcher.dispose(); + }); + this.treeData = []; + } +} + +export class SyncStatus extends TreeItem { + public modifiedBuildFiles: Set = new Set(); + + constructor( + public readonly label: string, + public readonly watcher: FileSystemWatcher, + public readonly collapsibleState: TreeItemCollapsibleState, + public readonly command?: Command + ) { + super(label, collapsibleState); + this.tooltip = this.label; + this.description = SYNCED; + + this.watcher.onDidChange((uri) => { + this.modifiedBuildFiles.add(uri); + this.description = UNSYNCED; + }); + } + + iconPath = { + light: Uri.file( + path.join(__filename, '..', 'resources', 'light', 'pass.svg') + ), + dark: Uri.file( + path.join(__filename, '..', 'resources', 'dark', 'pass.svg') + ), + }; + + clearState() { + this.modifiedBuildFiles.clear(); + this.description = SYNCED; + } +} + +// from a given starting dir, walk up the file tree until a BUILD file is found. return it +export function getModuleBuildFile(projectPath: string): string { + if (existsSync(projectPath)) { + if (lstatSync(projectPath).isDirectory()) { + for (const x of readdirSync(projectPath)) { + if ( + lstatSync(path.join(projectPath, x)).isFile() && + x.includes('BUILD') + ) { + return path.join(projectPath, x); + } + } + } + } else { + throw new Error(`invalide path: ${projectPath}`); + } + return getModuleBuildFile(path.dirname(projectPath)); +} diff --git a/src/provider/bazelTaskProvider.ts b/src/provider/bazelTaskProvider.ts new file mode 100644 index 0000000..f579773 --- /dev/null +++ b/src/provider/bazelTaskProvider.ts @@ -0,0 +1,110 @@ +import { XMLParser } from 'fast-xml-parser'; +import { readFileSync } from 'fs'; +import { join } from 'path'; +import { + ShellExecution, + Task, + TaskDefinition, + TaskProvider, + TaskScope, +} from 'vscode'; +import { BazelLanguageServerTerminal } from '../bazelLangaugeServerTerminal'; +import { getBazelProjectFile } from '../bazelprojectparser'; +import { getWorkspaceRoot } from '../util'; + +const parser = new XMLParser({ + ignoreAttributes: false, + allowBooleanAttributes: true, +}); + +export class BazelTaskProvider implements TaskProvider { + static BazelType = 'bazel'; + private bazelPromise: Thenable | undefined = undefined; + + public provideTasks(): Thenable | undefined { + if (!this.bazelPromise) { + this.bazelPromise = getBazelTasks(); + } + return this.bazelPromise; + } + + public resolveTask(task: Task): Task | undefined { + const taskDef = task.definition.task; + if (taskDef) { + // resolveTask requires that the same definition object be used. + const definition: BazelTaskDefinition = task.definition; + return new Task( + definition, + task.scope ?? TaskScope.Workspace, + definition.name, + definition.type, + new ShellExecution(`${definition.task}`) + ); + } + return undefined; + } +} + +class BazelTaskDefinition implements TaskDefinition { + type = 'bazel'; + name: string; + task: string; + + constructor(name: string, task: string) { + this.name = name; + this.task = task; + } +} + +async function getBazelTasks(): Promise { + // setup default bazel tasks + const taskDefinitions: BazelTaskDefinition[] = []; + + // add any ij converted run targets to vscode tasks + const bazelProjectFile = await getBazelProjectFile(); + if (bazelProjectFile.importRunConfigurations) { + const rootPath = getWorkspaceRoot(); + bazelProjectFile.importRunConfigurations.forEach((runConfig) => { + const rconf = getIJRunConfig(join(rootPath, runConfig)); + if (rconf) { + taskDefinitions.push(rconf); + } + }); + } + + return taskDefinitions.map( + (value) => + new Task( + value, + TaskScope.Workspace, + `${value.name}`, + `${value.type}`, + new ShellExecution(`${value.task}`), + [] + ) + ); +} + +function getIJRunConfig(configPath: string): BazelTaskDefinition | undefined { + const ijRunConfig = parser.parse( + readFileSync(configPath, { encoding: 'utf-8' }) + ); + if (typeof ijRunConfig === 'object') { + if ('configuration' in ijRunConfig) { + if ( + '@_type' in ijRunConfig.configuration && + ijRunConfig.configuration['@_type'] === + 'BlazeCommandRunConfigurationType' + ) { + return new BazelTaskDefinition( + ijRunConfig.configuration['@_name'], + `bazel ${ijRunConfig.configuration['blaze-settings']['@_blaze-command']} ${ijRunConfig.configuration['blaze-settings']['blaze-target']}` + ); + } + } + } + BazelLanguageServerTerminal.warn( + `failed to convert intellj run config: ${configPath}}` + ); + return undefined; +} diff --git a/src/tracing/otelUtils.ts b/src/tracing/otelUtils.ts new file mode 100644 index 0000000..02940b1 --- /dev/null +++ b/src/tracing/otelUtils.ts @@ -0,0 +1,170 @@ +import opentelemetry, { Counter, Meter, Tracer } from '@opentelemetry/api'; +import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-proto'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'; +import { + defaultResource, + Resource, + resourceFromAttributes, +} from '@opentelemetry/resources'; +import { + ConsoleMetricExporter, + MeterProvider, + PeriodicExportingMetricReader, + PushMetricExporter, +} from '@opentelemetry/sdk-metrics'; +import { + BatchSpanProcessor, + ConsoleSpanExporter, + SpanExporter, + WebTracerProvider, +} from '@opentelemetry/sdk-trace-web'; +import { + ATTR_SERVICE_NAME, + ATTR_SERVICE_VERSION, +} from '@opentelemetry/semantic-conventions'; +import { + ExtensionContext, + TextDocument, + workspace, + WorkspaceConfiguration, +} from 'vscode'; + +interface Headers { + [key: string]: string; +} + +const DEFAULT_ENDPOINT = 'http://localhost:4318'; +const DEFAULT_HEADERS = {} as Headers; + +export class ExtensionOtel { + private static _instance: ExtensionOtel; + private _config: WorkspaceConfiguration; + private _context: ExtensionContext; + private _resource: Resource; + private _traceExporter: SpanExporter; + private _metricExporter: PushMetricExporter; + private _traceProvider: WebTracerProvider; + private _meterProvider: MeterProvider; + private _tracer: Tracer; + private _meter: Meter; + private _fileOpenCounter: Counter; + private _fileSaveCounter: Counter; + + private constructor(ctx: ExtensionContext) { + this._context = ctx; + this._config = workspace.getConfiguration('bazel.telemetry'); + this._resource = defaultResource().merge( + resourceFromAttributes({ + [ATTR_SERVICE_NAME]: ctx.extension.packageJSON.name, + [ATTR_SERVICE_VERSION]: ctx.extension.packageJSON.version, + }) + ); + this._traceExporter = new OTLPTraceExporter({ + url: `${this.endpoint}/v1/traces`, + headers: this.headers, + }); + this._metricExporter = new OTLPMetricExporter({ + url: `${this.endpoint}/v1/metrics`, + headers: this.headers, + }); + + this._traceProvider = new WebTracerProvider({ + resource: this._resource, + spanProcessors: [ + new BatchSpanProcessor(this._traceExporter), + new BatchSpanProcessor(new ConsoleSpanExporter()), + ], + }); + this._traceProvider.register(); + + this._meterProvider = new MeterProvider({ + resource: this._resource, + readers: [ + new PeriodicExportingMetricReader({ + exporter: this._metricExporter, + }), + new PeriodicExportingMetricReader({ + exporter: new ConsoleMetricExporter(), + }), + ], + }); + + opentelemetry.metrics.setGlobalMeterProvider(this._meterProvider); + + this._tracer = opentelemetry.trace.getTracer( + ctx.extension.packageJSON.name + ); + this._meter = opentelemetry.metrics.getMeter( + ctx.extension.packageJSON.name + ); + + this._fileOpenCounter = this._meter.createCounter('file.opened', { + unit: 'lang', + }); + this._fileSaveCounter = this._meter.createCounter('file.saved', { + unit: 'lang', + }); + } + + private get endpoint() { + if (this._config.get('endpoint')) { + return this._config.get('endpoint', DEFAULT_ENDPOINT); + } + return process.env.OTEL_EXPORTER_OTLP_ENDPOINT + ? process.env.OTEL_EXPORTER_OTLP_ENDPOINT + : DEFAULT_ENDPOINT; + } + + private get headers() { + if (this._config.get('headers')) { + return this._config.get('headers', DEFAULT_HEADERS); + } + + return process.env.OTEL_EXPORTER_OTLP_HEADERS + ? process.env.OTEL_EXPORTER_OTLP_HEADERS.trim() + .split(',') + .reduce((acc, val) => { + const [k, v] = val.split('='); + acc[k.trim()] = v.trim(); + return acc; + }, DEFAULT_HEADERS) + : DEFAULT_HEADERS; + } + + public static getInstance(ctx: ExtensionContext): ExtensionOtel { + if (!this._instance) { + this._instance = new ExtensionOtel(ctx); + } + return this._instance; + } + + public get tracer(): Tracer { + return this._tracer; + } + + public get meter(): Meter { + return this._meter; + } + + public get fileOpenCounter() { + return this._fileOpenCounter; + } + + public get fileSaveCounter() { + return this._fileSaveCounter; + } +} + +export function registerMetrics(context: ExtensionContext) { + workspace.onDidOpenTextDocument((e: TextDocument) => { + ExtensionOtel.getInstance(context).fileOpenCounter.add(1, { + lang: e.languageId, + }); + }); + + workspace.onDidSaveTextDocument((e: TextDocument) => { + ExtensionOtel.getInstance(context).fileSaveCounter.add(1, { + lang: e.languageId, + }); + }); +} diff --git a/src/util.ts b/src/util.ts index 8e5cb22..81dc533 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,6 +1,6 @@ import { existsSync, mkdirSync, writeFileSync } from 'fs'; import { dirname, join } from 'path'; -import { Uri, window, workspace } from 'vscode'; +import { Uri, workspace } from 'vscode'; // TODO: pull this template out into a file const BAZELPROJECT_TEMPLATE = ` @@ -17,13 +17,13 @@ directories: derive_targets_from_directories: true `; -export const outputLog = window.createOutputChannel('Bazel - Java', { - log: true, -}); - export function getWorkspaceRoot(): string { if (workspace.workspaceFile) { - return dirname(workspace.workspaceFile.path); + const workspaceFilePath = dirname(workspace.workspaceFile.path); + if (workspaceFilePath.endsWith('.vscode')) { + return dirname(workspaceFilePath); + } + return workspaceFilePath; } else { if (workspace.workspaceFolders && workspace.workspaceFolders.length > 0) { return workspace.workspaceFolders[0].uri.path; diff --git a/syntaxes/bazelproject-language-configuration.json b/syntaxes/bazelproject-language-configuration.json new file mode 100644 index 0000000..7e54eaa --- /dev/null +++ b/syntaxes/bazelproject-language-configuration.json @@ -0,0 +1,5 @@ +{ + "comments": { + "lineComment": "#" + } +} \ No newline at end of file diff --git a/syntaxes/bazelproject.tmLanguage.json b/syntaxes/bazelproject.tmLanguage.json new file mode 100644 index 0000000..5cfc674 --- /dev/null +++ b/syntaxes/bazelproject.tmLanguage.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "bazelproject", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#comments" + } + ], + "repository": { + "keywords": { + "patterns": [{ + "name": "keyword.control.bazelproject", + "match": "\\b(directories|targets|derive_targets_from_directories|import|workspace_type|additional_languages|java_language_level|test_sources|shard_sync|target_shard_size|exclude_library|build_flags|sync_flags|test_flags|import_run_configurations|bazel_binary|android_sdk_platform|android_min_sdk|generated_android_resource_directories|gazelle_target|ts_config_rules)\\b" + }] + }, + "comments": { + "name": "comment.line.number-sign.bazelproject", + "begin": "#", + "end": "\n" + } + }, + "scopeName": "source.bazelproject" +} \ No newline at end of file diff --git a/syntaxes/starlark-language-configuration.json b/syntaxes/starlark-language-configuration.json new file mode 100644 index 0000000..484894c --- /dev/null +++ b/syntaxes/starlark-language-configuration.json @@ -0,0 +1,32 @@ +{ + "comments": { + "lineComment": "#" + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + { + "open": "\"", + "close": "\"", + "notIn": ["string", "comment"] + }, + { + "open": "'", + "close": "'", + "notIn": ["string", "comment"] + } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/syntaxes/starlark.tmLanguage.json b/syntaxes/starlark.tmLanguage.json new file mode 100644 index 0000000..65b4af4 --- /dev/null +++ b/syntaxes/starlark.tmLanguage.json @@ -0,0 +1,928 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "Starlark", + "scopeName": "source.starlark", + "fileTypes": ["BUILD", "WORKSPACE", "bazel", "bzl", "sky", "star"], + "patterns": [ + { + "include": "#statement" + }, + { + "include": "#expression" + } + ], + "repository": { + "statement": { + "patterns": [ + { + "include": "#function-definition" + }, + { + "include": "#statement-keyword" + }, + { + "include": "#assignment-operator" + }, + { + "include": "#docstring-statement" + }, + { + "include": "#discouraged-semicolon" + } + ] + }, + "docstring-statement": { + "begin": "^(?=\\s*r?('''|\"\"\"|'|\"))", + "end": "(?<='''|\"\"\"|'|\")", + "patterns": [ + { + "include": "#docstring" + } + ] + }, + "docstring": { + "patterns": [ + { + "name": "comment.block.documentation.python.starlark", + "begin": "('''|\"\"\")", + "end": "(\\1)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.begin.python.starlark" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python.starlark" + } + }, + "patterns": [ + { + "include": "#code-tag" + }, + { + "include": "#docstring-content" + } + ] + }, + { + "name": "comment.block.documentation.python.starlark", + "begin": "(r)('''|\"\"\")", + "end": "(\\2)", + "beginCaptures": { + "1": { + "name": "storage.type.string.python.starlark" + }, + "2": { + "name": "punctuation.definition.string.begin.python.starlark" + } + }, + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.python.starlark" + } + }, + "patterns": [ + { + "include": "#string-consume-escape" + }, + { + "include": "#code-tag" + } + ] + }, + { + "name": "comment.line.documentation.python.starlark", + "begin": "('|\")", + "end": "(\\1)|((?=|<=|<|>)(?# 4)", + "captures": { + "1": { + "name": "keyword.operator.logical.python.starlark" + }, + "2": { + "name": "keyword.control.flow.python.starlark" + }, + "3": { + "name": "keyword.operator.arithmetic.python.starlark" + }, + "4": { + "name": "keyword.operator.comparison.python.starlark" + } + } + }, + "literal": { + "patterns": [ + { + "name": "constant.language.python.starlark", + "match": "\\b(True|False|None)\\b" + }, + { + "include": "#number" + } + ] + }, + "number": { + "patterns": [ + { + "include": "#number-decimal" + }, + { + "include": "#number-hexadecimal" + }, + { + "include": "#number-octal" + }, + { + "name": "invalid.illegal.name.python.starlark", + "match": "\\b[0-9]+\\w+" + } + ] + }, + "number-decimal": { + "name": "constant.numeric.decimal.python.starlark", + "match": "(?": { + "name": "", + "version": "", + "key": "", + "repoName": "", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + } + }, + "bazel_tools@_": { + "name": "bazel_tools", + "version": "", + "key": "bazel_tools@_", + "repoName": "bazel_tools", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all", + "@local_config_sh//:local_sh_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 17, + "column": 29 + }, + "imports": { + "local_config_cc": "local_config_cc", + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl", + "extensionName": "xcode_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 21, + "column": 32 + }, + "imports": { + "local_config_xcode": "local_config_xcode" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 24, + "column": 32 + }, + "imports": { + "local_jdk": "local_jdk", + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl", + "extensionName": "sh_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 35, + "column": 39 + }, + "imports": { + "local_config_sh": "local_config_sh" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl", + "extensionName": "remote_coverage_tools_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 39, + "column": 48 + }, + "imports": { + "remote_coverage_tools": "remote_coverage_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl", + "extensionName": "remote_android_tools_extensions", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 42, + "column": 42 + }, + "imports": { + "android_gmaven_r8": "android_gmaven_r8", + "android_tools": "android_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "rules_java": "rules_java@7.1.0", + "rules_license": "rules_license@0.0.7", + "rules_proto": "rules_proto@4.0.0", + "rules_python": "rules_python@0.4.0", + "platforms": "platforms@0.0.7", + "com_google_protobuf": "protobuf@3.19.6", + "zlib": "zlib@1.3", + "build_bazel_apple_support": "apple_support@1.5.0", + "local_config_platform": "local_config_platform@_" + } + }, + "local_config_platform@_": { + "name": "local_config_platform", + "version": "", + "key": "local_config_platform@_", + "repoName": "local_config_platform", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_" + } + }, + "rules_cc@0.0.9": { + "name": "rules_cc", + "version": "0.0.9", + "key": "rules_cc@0.0.9", + "repoName": "rules_cc", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "rules_cc@0.0.9", + "location": { + "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel", + "line": 9, + "column": 29 + }, + "imports": { + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_cc~0.0.9", + "urls": [ + "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz" + ], + "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=", + "strip_prefix": "rules_cc-0.0.9", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_java@7.1.0": { + "name": "rules_java", + "version": "7.1.0", + "key": "rules_java@7.1.0", + "repoName": "rules_java", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains:all", + "@local_jdk//:runtime_toolchain_definition", + "@local_jdk//:bootstrap_runtime_toolchain_definition", + "@remotejdk11_linux_toolchain_config_repo//:all", + "@remotejdk11_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk11_linux_s390x_toolchain_config_repo//:all", + "@remotejdk11_macos_toolchain_config_repo//:all", + "@remotejdk11_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk11_win_toolchain_config_repo//:all", + "@remotejdk11_win_arm64_toolchain_config_repo//:all", + "@remotejdk17_linux_toolchain_config_repo//:all", + "@remotejdk17_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk17_linux_s390x_toolchain_config_repo//:all", + "@remotejdk17_macos_toolchain_config_repo//:all", + "@remotejdk17_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk17_win_toolchain_config_repo//:all", + "@remotejdk17_win_arm64_toolchain_config_repo//:all", + "@remotejdk21_linux_toolchain_config_repo//:all", + "@remotejdk21_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk21_macos_toolchain_config_repo//:all", + "@remotejdk21_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk21_win_toolchain_config_repo//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "rules_java@7.1.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel", + "line": 19, + "column": 27 + }, + "imports": { + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64", + "local_jdk": "local_jdk", + "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo", + "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo", + "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo", + "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo", + "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo", + "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo", + "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo", + "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo", + "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo", + "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo", + "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo", + "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo", + "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo", + "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo", + "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo", + "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo", + "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo", + "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo", + "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo", + "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo", + "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.7", + "rules_cc": "rules_cc@0.0.9", + "bazel_skylib": "bazel_skylib@1.3.0", + "rules_proto": "rules_proto@4.0.0", + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0", + "urls": [ + "https://github.com/bazelbuild/rules_java/releases/download/7.1.0/rules_java-7.1.0.tar.gz" + ], + "integrity": "sha256-o3pOX2OrgnFuXdau75iO2EYcegC46TYnImKJn1h81OE=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_license@0.0.7": { + "name": "rules_license", + "version": "0.0.7", + "key": "rules_license@0.0.7", + "repoName": "rules_license", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_license~0.0.7", + "urls": [ + "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz" + ], + "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_proto@4.0.0": { + "name": "rules_proto", + "version": "4.0.0", + "key": "rules_proto@4.0.0", + "repoName": "rules_proto", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_proto~4.0.0", + "urls": [ + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.zip" + ], + "integrity": "sha256-Lr5z6xyuRA19pNtRYMGjKaynwQpck4H/lwYyVjyhoq4=", + "strip_prefix": "rules_proto-4.0.0", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_proto/4.0.0/patches/module_dot_bazel.patch": "sha256-MclJO7tIAM2ElDAmscNId9pKTpOuDGHgVlW/9VBOIp0=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_python@0.4.0": { + "name": "rules_python", + "version": "0.4.0", + "key": "rules_python@0.4.0", + "repoName": "rules_python", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@bazel_tools//tools/python:autodetecting_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_python//bzlmod:extensions.bzl", + "extensionName": "pip_install", + "usingModule": "rules_python@0.4.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel", + "line": 7, + "column": 28 + }, + "imports": { + "pypi__click": "pypi__click", + "pypi__pip": "pypi__pip", + "pypi__pip_tools": "pypi__pip_tools", + "pypi__pkginfo": "pypi__pkginfo", + "pypi__setuptools": "pypi__setuptools", + "pypi__wheel": "pypi__wheel" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_python~0.4.0", + "urls": [ + "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz" + ], + "integrity": "sha256-lUqom0kb5KCDMEosuDgBnIuMNyCnq7nEy4GseiQjDOo=", + "strip_prefix": "", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/propagate_pip_install_dependencies.patch": "sha256-v7S/dem/mixg63MF4KoRGDA4KEol9ab/tIVp+6Xq0D0=", + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/module_dot_bazel.patch": "sha256-kG4VIfWxQazzTuh50mvsx6pmyoRVA4lfH5rkto/Oq+Y=" + }, + "remote_patch_strip": 1 + } + } + }, + "platforms@0.0.7": { + "name": "platforms", + "version": "0.0.7", + "key": "platforms@0.0.7", + "repoName": "platforms", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "platforms", + "urls": [ + "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz" + ], + "integrity": "sha256-OlYcmee9vpFzqmU/1Xn+hJ8djWc5V4CrR3Cx84FDHVE=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "protobuf@3.19.6": { + "name": "protobuf", + "version": "3.19.6", + "key": "protobuf@3.19.6", + "repoName": "protobuf", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "zlib": "zlib@1.3", + "rules_python": "rules_python@0.4.0", + "rules_cc": "rules_cc@0.0.9", + "rules_proto": "rules_proto@4.0.0", + "rules_java": "rules_java@7.1.0", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "protobuf~3.19.6", + "urls": [ + "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.19.6.zip" + ], + "integrity": "sha256-OH4sVZuyx8G8N5jE5s/wFTgaebJ1hpavy/johzC0c4k=", + "strip_prefix": "protobuf-3.19.6", + "remote_patches": { + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/relative_repo_names.patch": "sha256-w/5gw/zGv8NFId+669hcdw1Uus2lxgYpulATHIwIByI=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/remove_dependency_on_rules_jvm_external.patch": "sha256-THUTnVgEBmjA0W7fKzIyZOVG58DnW9HQTkr4D2zKUUc=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/add_module_dot_bazel_for_examples.patch": "sha256-s/b1gi3baK3LsXefI2rQilhmkb2R5jVJdnT6zEcdfHY=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/module_dot_bazel.patch": "sha256-S0DEni8zgx7rHscW3z/rCEubQnYec0XhNet640cw0h4=" + }, + "remote_patch_strip": 1 + } + } + }, + "zlib@1.3": { + "name": "zlib", + "version": "1.3", + "key": "zlib@1.3", + "repoName": "zlib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "zlib~1.3", + "urls": [ + "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" + ], + "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=", + "strip_prefix": "zlib-1.3", + "remote_patches": { + "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=", + "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk=" + }, + "remote_patch_strip": 0 + } + } + }, + "apple_support@1.5.0": { + "name": "apple_support", + "version": "1.5.0", + "key": "apple_support@1.5.0", + "repoName": "build_bazel_apple_support", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_apple_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl", + "extensionName": "apple_cc_configure_extension", + "usingModule": "apple_support@1.5.0", + "location": { + "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel", + "line": 17, + "column": 35 + }, + "imports": { + "local_config_apple_cc": "local_config_apple_cc", + "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "apple_support~1.5.0", + "urls": [ + "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz" + ], + "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "bazel_skylib@1.3.0": { + "name": "bazel_skylib", + "version": "1.3.0", + "key": "bazel_skylib@1.3.0", + "repoName": "bazel_skylib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains/unittest:cmd_toolchain", + "//toolchains/unittest:bash_toolchain" + ], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "bazel_skylib~1.3.0", + "urls": [ + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" + ], + "integrity": "sha256-dNVE2W9KW7Yw1GXKi7z+Ix41lOWq5X4e2/F6brPKJQY=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + } }, - "selectedYankedVersions": {}, "moduleExtensions": { - "@@platforms//host:extension.bzl%host_platform": { + "@@apple_support~1.5.0//crosstool:setup.bzl%apple_cc_configure_extension": { + "general": { + "bzlTransitiveDigest": "pMLFCYaRPkgXPQ8vtuNkMfiHfPmRBy6QJfnid4sWfv0=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_apple_cc": { + "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf", + "attributes": { + "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc" + } + }, + "local_config_apple_cc_toolchains": { + "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf_toolchains", + "attributes": { + "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc_toolchains" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "apple_support~1.5.0", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "@@bazel_tools//tools/cpp:cc_configure.bzl%cc_configure_extension": { + "general": { + "bzlTransitiveDigest": "mcsWHq3xORJexV5/4eCvNOLxFOQKV6eli3fkr+tEaqE=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_cc": { + "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl", + "ruleClassName": "cc_autoconf", + "attributes": { + "name": "bazel_tools~cc_configure_extension~local_config_cc" + } + }, + "local_config_cc_toolchains": { + "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl", + "ruleClassName": "cc_autoconf_toolchains", + "attributes": { + "name": "bazel_tools~cc_configure_extension~local_config_cc_toolchains" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "bazel_tools", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": { + "general": { + "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_xcode": { + "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl", + "ruleClassName": "xcode_autoconf", + "attributes": { + "name": "bazel_tools~xcode_configure_extension~local_config_xcode", + "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m", + "remote_xcode": "" + } + } + }, + "recordedRepoMappingEntries": [] + } + }, + "@@bazel_tools//tools/sh:sh_configure.bzl%sh_configure_extension": { "general": { - "bzlTransitiveDigest": "xelQcPZH8+tmuOHVjL9vDxMnnQNMlwj0SlvgoqBkm4U=", - "usagesDigest": "SeQiIN/f8/Qt9vYQk7qcXp4I4wJeEC0RnQDiaaJ4tb8=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, + "bzlTransitiveDigest": "hp4NgmNjEg5+xgvzfh6L83bt9/aiiWETuNpwNuF1MSU=", + "accumulatedFileDigests": {}, "envVariables": {}, "generatedRepoSpecs": { - "host_platform": { - "repoRuleId": "@@platforms//host:extension.bzl%host_platform_repo", - "attributes": {} + "local_config_sh": { + "bzlFile": "@@bazel_tools//tools/sh:sh_configure.bzl", + "ruleClassName": "sh_config", + "attributes": { + "name": "bazel_tools~sh_configure_extension~local_config_sh" + } } }, "recordedRepoMappingEntries": [] } }, - "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "@@rules_java~7.1.0//java:extensions.bzl%toolchains": { "general": { - "bzlTransitiveDigest": "sFhcgPbDQehmbD1EOXzX4H1q/CD5df8zwG4kp4jbvr8=", - "usagesDigest": "QI2z8ZUR+mqtbwsf2fLqYdJAkPOHdOV+tF2yVAUgRzw=", - "recordedFileInputs": {}, - "recordedDirentsInputs": {}, + "bzlTransitiveDigest": "D02GmifxnV/IhYgspsJMDZ/aE8HxAjXgek5gi6FSto4=", + "accumulatedFileDigests": {}, "envVariables": {}, "generatedRepoSpecs": { - "com_github_jetbrains_kotlin_git": { - "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_compiler_git_repository", + "remotejdk21_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\n" + } + }, + "remotejdk17_linux_s390x_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\n" + } + }, + "remotejdk21_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk17_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk21_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "2a7a99a3ea263dbd8d32a67d1e6e363ba8b25c645c826f5e167a02bbafaff1fa", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz" + ] + } + }, + "remotejdk17_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "314b04568ec0ae9b36ba03c9cbd42adc9e1265f74678923b19297d66eb84dcca", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz" + ] + } + }, + "remote_java_tools_windows": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_windows", + "sha256": "c5c70c214a350f12cbf52da8270fa43ba629b795f3dd328028a38f8f0d39c2a1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_windows-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_windows-v13.1.zip" + ] + } + }, + "remotejdk11_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "43408193ce2fa0862819495b5ae8541085b95660153f2adcf91a52d3a1710e83", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip" + ] + } + }, + "remotejdk11_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "54174439f2b3fddd11f1048c397fe7bb45d4c9d66d452d6889b013d04d21c4de", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk17_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "b9482f2304a1a68a614dfacddcf29569a72f0fac32e6c74f83dc1b9a157b8340", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz" + ] + } + }, + "remotejdk11_linux_s390x_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\n" + } + }, + "remotejdk11_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "bcaab11cfe586fae7583c6d9d311c64384354fb2638eb9a012eca4c3f1a1d9fd", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz" + ] + } + }, + "remotejdk11_win_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2", + "strip_prefix": "jdk-11.0.13+8", + "urls": [ + "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip" + ] + } + }, + "remotejdk17_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "640453e8afe8ffe0fb4dceb4535fb50db9c283c64665eebb0ba68b19e65f4b1f", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz" + ] + } + }, + "remotejdk21_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "9639b87db586d0c89f7a9892ae47f421e442c64b97baebdff31788fbe23265bd", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz" + ] + } + }, + "remotejdk21_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk17_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "192f2afca57701de6ec496234f7e45d971bf623ff66b8ee4a5c81582054e5637", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip" + ] + } + }, + "remotejdk11_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_ppc64le_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\n" + } + }, + "remotejdk21_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "0c0eadfbdc47a7ca64aeab51b9c061f71b6e4d25d2d87674512e9b6387e9e3a6", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz" + ] + } + }, + "remote_java_tools_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_linux", + "sha256": "d134da9b04c9023fb6e56a5d4bffccee73f7bc9572ddc4e747778dacccd7a5a7", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_linux-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_linux-v13.1.zip" + ] + } + }, + "remotejdk21_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "e9959d500a0d9a7694ac243baf657761479da132f0f94720cbffd092150bd802", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip" + ] + } + }, + "remotejdk21_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "1fb64b8036c5d463d8ab59af06bf5b6b006811e6012e3b0eb6bccf57f1c55835", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk11_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_s390x": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b", + "strip_prefix": "jdk-11.0.15+10", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz", + "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz" + ] + } + }, + "remotejdk17_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "6531cef61e416d5a7b691555c8cf2bdff689201b8a001ff45ab6740062b44313", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk17_win_arm64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a34b404f87a08a61148b38e1416d837189e1df7a040d949e743633daf4695a3c", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_x64", "urls": [ - "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" - ], - "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz" + ] + } + }, + "remotejdk11_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\n" } }, - "com_github_jetbrains_kotlin": { - "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_capabilities_repository", + "remotejdk17_linux_ppc64le_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", "attributes": { - "git_repository_name": "com_github_jetbrains_kotlin_git", - "compiler_version": "1.9.23" + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\n" } }, - "com_github_google_ksp": { - "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:ksp.bzl%ksp_compiler_plugin_repository", + "remotejdk17_win_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "6802c99eae0d788e21f52d03cab2e2b3bf42bc334ca03cbf19f71eb70ee19f85", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_aarch64", "urls": [ - "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" - ], - "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", - "strip_version": "1.9.23-1.0.20" + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip" + ] } }, - "com_github_pinterest_ktlint": { - "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_file", + "remote_java_tools_darwin_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", "attributes": { - "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_arm64", + "sha256": "dab5bb87ec43e980faea6e1cec14bafb217b8e2f5346f53aa784fd715929a930", "urls": [ - "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" - ], - "executable": true + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_arm64-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_arm64-v13.1.zip" + ] } }, - "rules_android": { - "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "remotejdk17_linux_ppc64le": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", "attributes": { - "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", - "strip_prefix": "rules_android-0.1.1", + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "00a4c07603d0218cd678461b5b3b7e25b3253102da4022d31fc35907f21a2efd", + "strip_prefix": "jdk-17.0.8.1+1", "urls": [ - "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz" ] } + }, + "remotejdk21_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_win_arm64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\n" + } + }, + "local_jdk": { + "bzlFile": "@@rules_java~7.1.0//toolchains:local_java_repository.bzl", + "ruleClassName": "_local_java_repository_rule", + "attributes": { + "name": "rules_java~7.1.0~toolchains~local_jdk", + "java_home": "", + "version": "", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = {RUNTIME_VERSION},\n)\n" + } + }, + "remote_java_tools_darwin_x86_64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_x86_64", + "sha256": "0db40d8505a2b65ef0ed46e4256757807db8162f7acff16225be57c1d5726dbc", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_x86_64-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_x86_64-v13.1.zip" + ] + } + }, + "remote_java_tools": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools", + "sha256": "286bdbbd66e616fc4ed3f90101418729a73baa7e8c23a98ffbef558f74c0ad14", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools-v13.1.zip" + ] + } + }, + "remotejdk17_linux_s390x": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "ffacba69c6843d7ca70d572489d6cc7ab7ae52c60f0852cedf4cf0d248b6fc37", + "strip_prefix": "jdk-17.0.8.1+1", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz" + ] + } + }, + "remotejdk17_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_ppc64le": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f", + "strip_prefix": "jdk-11.0.15+10", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz", + "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz" + ] + } + }, + "remotejdk11_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "7632bc29f8a4b7d492b93f3bc75a7b61630894db85d136456035ab2a24d38885", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz" + ] + } + }, + "remotejdk21_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\n" + } } }, "recordedRepoMappingEntries": [ [ - "rules_kotlin+", + "rules_java~7.1.0", "bazel_tools", "bazel_tools" + ], + [ + "rules_java~7.1.0", + "remote_java_tools", + "rules_java~7.1.0~toolchains~remote_java_tools" ] ] } diff --git a/test/projects/small/WORKSPACE b/test/projects/small/WORKSPACE index 92fff24..960af13 100644 --- a/test/projects/small/WORKSPACE +++ b/test/projects/small/WORKSPACE @@ -2,34 +2,30 @@ workspace(name = "bazel_ls_demo_project") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +# bazel-skylib 0.8.0 released 2019.03.20 (https://github.com/bazelbuild/bazel-skylib/releases/tag/0.8.0) +skylib_version = "0.8.0" http_archive( name = "bazel_skylib", type = "tar.gz", - sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f", - urls = [ - "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz", - ], + url = "https://github.com/bazelbuild/bazel-skylib/releases/download/{}/bazel-skylib.{}.tar.gz".format (skylib_version, skylib_version), + sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", ) # check minimum Bazel version load("@bazel_skylib//lib:versions.bzl", "versions") - -versions.check(minimum_bazel_version = "5.0.0") +versions.check(minimum_bazel_version= "5.0.0") http_archive( name = "salesforce_rules_mybuilder", - sha256 = "1eb96edc0dd22bab71386a8ee84a8636b1b9acea6db64f8ceed67903fa140dbf", - strip_prefix = "bazel-java-builder-template-2f4d0574885c6455a9c6f1fdf20b7f64225a946a", url = "https://github.com/salesforce/bazel-java-builder-template/archive/2f4d0574885c6455a9c6f1fdf20b7f64225a946a.zip", + strip_prefix = "bazel-java-builder-template-2f4d0574885c6455a9c6f1fdf20b7f64225a946a", + sha256 = "1eb96edc0dd22bab71386a8ee84a8636b1b9acea6db64f8ceed67903fa140dbf", ) load("@salesforce_rules_mybuilder//mybuilder:repositories.bzl", "rules_mybuilder_dependencies", "rules_mybuilder_toolchains") - rules_mybuilder_dependencies() - rules_mybuilder_toolchains() # Maven dependencies load("//third_party/maven:dependencies.bzl", "maven_dependencies") - maven_dependencies() diff --git a/test/projects/small/module3/BUILD b/test/projects/small/module3/BUILD index 9b3819d..f2f951f 100644 --- a/test/projects/small/module3/BUILD +++ b/test/projects/small/module3/BUILD @@ -1,10 +1,7 @@ load("@rules_java//java:defs.bzl", "java_library") -java_library( +java_library ( name = "module3", srcs = glob(["java/src/**/*.java"]), - visibility = [ - "//module1:__pkg__", - "//module2:__pkg__", - ], + visibility = ["//module1:__pkg__", "//module2:__pkg__"] ) diff --git a/test/runTest.ts b/test/runTest.ts index 282d1ae..e755a09 100644 --- a/test/runTest.ts +++ b/test/runTest.ts @@ -37,14 +37,10 @@ async function main() { resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); // span vs code process for custom setup - cp.spawnSync( - cliPath, - [...args, '--install-extension', 'redhat.java', 'sfdc-eng.bazel-vscode'], - { - encoding: 'utf-8', - stdio: 'inherit', - } - ); + cp.spawnSync(cliPath, [...args, '--install-extension', 'redhat.java'], { + encoding: 'utf-8', + stdio: 'inherit', + }); // ensrue the user data area is empty if (fs.existsSync(testUserDataPath)) { diff --git a/test/suite/extension.test.ts b/test/suite/extension.test.ts index 860ec03..04c5656 100644 --- a/test/suite/extension.test.ts +++ b/test/suite/extension.test.ts @@ -10,7 +10,7 @@ import { Jdtls } from './Jdtls'; suite('Java Language Extension - Standard', () => { suiteSetup(async function () { try { - await extensions.getExtension('sfdc-eng.bazel-java')?.activate(); + await extensions.getExtension('COMP.java-bazel-extension')?.activate(); } catch (e) { console.error(e); } @@ -18,7 +18,7 @@ suite('Java Language Extension - Standard', () => { test('version should be correct', async function () { const api: BazelVscodeExtensionAPI = extensions.getExtension( - 'sfdc-eng.bazel-java' + 'COMP.java-bazel-extension' )?.exports; assert.ok(api.parseProjectFile !== null); @@ -29,7 +29,7 @@ suite('Java Language Extension - Standard', () => { }); test('Bazel Java Extension should be present', () => { - assert.ok(vscode.extensions.getExtension('sfdc-eng.bazel-java')); + assert.ok(vscode.extensions.getExtension('COMP.java-bazel-extension')); }); test('RedHat Java Extension should activate', async function () { @@ -45,7 +45,7 @@ suite('Java Language Extension - Standard', () => { test('Bazel Java Extension should activate', async function () { this.timeout(60000 * 2); - const ext = vscode.extensions.getExtension('sfdc-eng.bazel-java'); + const ext = vscode.extensions.getExtension('COMP.java-bazel-extension'); while (true) { await setTimeout(5000); if (ext!.isActive) { @@ -61,10 +61,12 @@ suite('Java Language Extension - Standard', () => { return; } - let api = vscode.extensions.getExtension('bazel-vscode-java')?.exports; + let api = vscode.extensions.getExtension( + 'COMP.java-bazel-extension' + )?.exports; if (!api) { api = await vscode.extensions - .getExtension('bazel-vscode-java') + .getExtension('COMP.java-bazel-extension') ?.activate(); } @@ -77,12 +79,19 @@ suite('Java Language Extension - Standard', () => { const commands = await vscode.commands.getCommands(true); const JAVA_COMMANDS = [ + Commands.SYNC_PROJECTS_CMD, + Commands.SYNC_DIRECTORIES_ONLY, Commands.UPDATE_CLASSPATHS_CMD, Commands.DEBUG_LS_CMD, + Commands.OPEN_BAZEL_BUILD_STATUS_CMD, + Commands.OPEN_BAZEL_PROJECT_FILE, + Commands.CONVERT_PROJECT_WORKSPACE, ].sort(); const foundBazelJavaCommands = commands - .filter((value) => value.startsWith('java.bazel.')) + .filter( + (value) => value.startsWith('java.bazel.') || value.startsWith('bazel.') + ) .filter((value) => !COMMAND_EXCLUSIONS.includes(value)) .sort(); @@ -106,25 +115,40 @@ suite('Java Language Extension - Standard', () => { }); // this is currently broken for the `small` test project. - test('should build workspace without problems within reasonable time', function () { + test.skip('should build workspace without problems within reasonable time', function () { this.timeout(60000 * 5); - return Jdtls.buildWorkspace().then( - (result) => { - assert.strictEqual(result, Jdtls.CompileWorkspaceStatus.Succeed); - - return Jdtls.getSourcePaths().then( - (resp) => { - const projects = new Set(resp.data.map((p) => p.projectName)); - assert.ok(projects.size > 0); - }, - (e) => { - console.error(JSON.stringify(e)); - } - ); - }, - (err) => { - console.error(err); - } + return Jdtls.buildWorkspace().then((result) => { + assert.strictEqual(result, Jdtls.CompileWorkspaceStatus.Succeed); + + return Jdtls.getSourcePaths().then( + (resp) => { + const projects = new Set(resp.data.map((p) => p.projectName)); + assert.ok(projects.size > 0); + }, + (e) => { + console.error(JSON.stringify(e)); + } + ); + }); + }); + + test('updateClasspaths command should be registered', async function () { + const commands = await vscode.commands.getCommands(true); + assert.ok( + commands.includes(Commands.UPDATE_CLASSPATHS_CMD), + 'UPDATE_CLASSPATHS_CMD should be registered' + ); + }); + + test('updateClasspaths command should exist as executable command', async function () { + // Verify that the command can be retrieved + const allCommands = await vscode.commands.getCommands(true); + const updateClasspathsExists = allCommands.includes( + Commands.UPDATE_CLASSPATHS_CMD + ); + assert.ok( + updateClasspathsExists, + 'updateClasspaths command should be registered' ); }); });