drccrd commented on code in PR #3665: URL: https://github.com/apache/incubator-kie-tools/pull/3665#discussion_r3608697384
########## packages/drl-vscode-extension/DEV.md: ########## @@ -0,0 +1,36 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +## Build + +This package depends on the server uber-JAR produced by `@kie-tools/drools-lsp`, so build it through the workspace filter that includes dependencies: + +```sh +pnpm -F drl-vscode-extension... build:dev Review Comment: building downloads the entire drools-and-kogito dependency chain, which is a lot of overhead not necessary for this tool and a significant hurdle for potential contributors. It is not introduced in this PR but inherited from `maven-base` in `kogito-apps-bom`, but maybe worth a followup rescoping, if not here? I haven't tried it yet, but claude recommends adding an opt-out to the parent KIE BOM for minimal tool builds **Surgical, near-zero blast radius: gate the KIE BOM behind a default-on, opt-out profile in maven-base, and have drools-lsp opt out + pin ANTLR.** In `maven-base/pom.xml.template`, move the BOM import into a profile that's active unless a property says otherwise: ``` xml <profiles> <profile> <id>kie-runtime-bom</id> <activation> <property><name>!kieRuntimeBom.skip</name></property> <!-- active by default --> </activation> <dependencyManagement> <dependencies> <dependency> <groupId>org.kie.kogito</groupId> <artifactId>kogito-apps-bom</artifactId> <version>${version.org.kie.kogito}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> </profile> </profiles> ``` Then in drools-lsp/pom.xml, opt out and pin the one version it was getting from the BOM: ``` xml <properties> <kieRuntimeBom.skip>true</kieRuntimeBom.skip> <version.org.antlr4>4.13.2</version.org.antlr4> </properties> <dependencyManagement> <dependencies> <dependency><groupId>org.antlr</groupId><artifactId>antlr4-runtime</artifactId><version>${version.org.antlr4}</version></dependency> <dependency><groupId>org.antlr</groupId><artifactId>antlr4</artifactId><version>${version.org.antlr4}</version></dependency> </dependencies> </dependencyManagement> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
