diff --git a/build.gradle.kts b/build.gradle.kts index 064bc21f346..40c9333553a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,7 +16,7 @@ plugins { id("io.freefair.maven-central.validate-poms") version "8.6" id("me.qoomon.git-versioning") version "6.4.3" id("com.github.ben-manes.versions") version "0.51.0" - id("org.springframework.boot") version "3.2.5" + id("org.springframework.boot") version "3.3.0" id("io.spring.dependency-management") version "1.1.5" id("io.github.1c-syntax.bslls-dev-tools") version "0.8.0" id("ru.vyarus.pom") version "3.0.0" @@ -52,7 +52,7 @@ gitVersioning.apply { val isSnapshot = gitVersioning.gitVersionDetails.refType != GitRefType.TAG -val languageToolVersion = "6.1" +val languageToolVersion = "6.4" dependencyManagement { imports { @@ -70,8 +70,8 @@ dependencies { api("info.picocli:picocli-spring-boot-starter:4.7.6") // lsp4j core - api("org.eclipse.lsp4j", "org.eclipse.lsp4j", "0.21.0") - api("org.eclipse.lsp4j", "org.eclipse.lsp4j.websocket.jakarta", "0.21.0") + api("org.eclipse.lsp4j", "org.eclipse.lsp4j", "0.23.1") + api("org.eclipse.lsp4j", "org.eclipse.lsp4j.websocket.jakarta", "0.23.1") // 1c-syntax api("io.github.1c-syntax", "bsl-parser", "0.24.0") { @@ -95,19 +95,19 @@ dependencies { implementation("org.languagetool", "language-ru", languageToolVersion) // AOP - implementation("org.aspectj", "aspectjrt", "1.9.19") + implementation("org.aspectj", "aspectjrt", "1.9.22.1") // commons utils - implementation("commons-io", "commons-io", "2.13.0") - implementation("org.apache.commons", "commons-lang3", "3.12.0") + implementation("commons-io", "commons-io", "2.16.1") + implementation("org.apache.commons", "commons-lang3", "3.14.0") implementation("commons-beanutils", "commons-beanutils", "1.9.4"){ exclude("commons-logging", "commons-logging") } implementation("org.apache.commons", "commons-collections4", "4.4") - implementation("org.apache.commons", "commons-exec", "1.3") + implementation("org.apache.commons", "commons-exec", "1.4.0") // progress bar - implementation("me.tongfei", "progressbar", "0.9.5") + implementation("me.tongfei", "progressbar", "0.10.1") // (de)serialization implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") @@ -126,7 +126,7 @@ dependencies { // CONSTRAINTS implementation("com.google.guava:guava") { version { - strictly("32.0.1-jre") + strictly("33.2.1-jre") } } @@ -142,11 +142,11 @@ dependencies { // test utils testImplementation("org.jmockit", "jmockit", "1.49") - testImplementation("org.awaitility", "awaitility", "4.2.0") + testImplementation("org.awaitility", "awaitility", "4.2.1") } lombok { - version.set("edge-SNAPSHOT") + version.set("1.18.32") } jacoco { diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/codelenses/testrunner/TestRunnerAdapter.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/codelenses/testrunner/TestRunnerAdapter.java index c853bb4b290..badd8e71f7f 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/codelenses/testrunner/TestRunnerAdapter.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/codelenses/testrunner/TestRunnerAdapter.java @@ -38,6 +38,7 @@ import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Paths; +import java.time.Duration; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -83,14 +84,14 @@ private List computeTestIds(DocumentContext documentContext) { var getTestsCommand = new CommandLine(executable).addArguments(arguments, false); var timeout = 10_000L; - var watchdog = new ExecuteWatchdog(timeout); + var watchdog = ExecuteWatchdog.builder().setTimeout(Duration.ofMillis(timeout)).get(); var outputStream = new ByteArrayOutputStream(); var streamHandler = new PumpStreamHandler(outputStream); var resultHandler = new DefaultExecuteResultHandler(); - var executor = new DefaultExecutor(); + var executor = DefaultExecutor.builder().get(); executor.setWatchdog(watchdog); executor.setStreamHandler(streamHandler); diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/TypoDiagnostic.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/TypoDiagnostic.java index 5183d00a53c..32db59a0a11 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/TypoDiagnostic.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/TypoDiagnostic.java @@ -38,8 +38,7 @@ import org.antlr.v4.runtime.Token; import org.apache.commons.lang3.StringUtils; import org.languagetool.JLanguageTool; -import org.languagetool.language.AmericanEnglish; -import org.languagetool.language.Russian; +import org.languagetool.Languages; import org.languagetool.rules.RuleMatch; import java.io.IOException; @@ -68,8 +67,8 @@ public class TypoDiagnostic extends AbstractDiagnostic { @Getter(lazy = true, value = AccessLevel.PRIVATE) private static final Map languageToolPoolMap = Map.of( - "en", new JLanguageToolPool(new AmericanEnglish()), - "ru", new JLanguageToolPool(new Russian()) + "en", new JLanguageToolPool(Languages.getLanguageForShortCode("en-US")), + "ru", new JLanguageToolPool(Languages.getLanguageForShortCode("ru")) ); /** diff --git a/src/main/resources/META-INF/org/languagetool/language-module.properties b/src/main/resources/META-INF/org/languagetool/language-module.properties index 0f30d56af5e..214173d254a 100644 --- a/src/main/resources/META-INF/org/languagetool/language-module.properties +++ b/src/main/resources/META-INF/org/languagetool/language-module.properties @@ -1 +1 @@ -languageClasses=org.languagetool.language.AmericanEnglish,org.languagetool.language.Russian \ No newline at end of file +languageClasses=org.languagetool.language.en.AmericanEnglish,org.languagetool.language.ru.Russian \ No newline at end of file diff --git a/src/test/java/com/github/_1c_syntax/bsl/languageserver/BSLLanguageServerTest.java b/src/test/java/com/github/_1c_syntax/bsl/languageserver/BSLLanguageServerTest.java index 479b4ddcebb..73db8cd1116 100644 --- a/src/test/java/com/github/_1c_syntax/bsl/languageserver/BSLLanguageServerTest.java +++ b/src/test/java/com/github/_1c_syntax/bsl/languageserver/BSLLanguageServerTest.java @@ -66,7 +66,7 @@ void initialize() throws ExecutionException, InterruptedException { // given InitializeParams params = new InitializeParams(); - WorkspaceFolder workspaceFolder = new WorkspaceFolder(Absolute.path(PATH_TO_METADATA).toUri().toString()); + WorkspaceFolder workspaceFolder = new WorkspaceFolder(Absolute.path(PATH_TO_METADATA).toUri().toString(), "test"); List workspaceFolders = List.of(workspaceFolder); params.setWorkspaceFolders(workspaceFolders); @@ -82,7 +82,7 @@ void initializeRename() throws ExecutionException, InterruptedException { // given InitializeParams params = new InitializeParams(); - WorkspaceFolder workspaceFolder = new WorkspaceFolder(Absolute.path(PATH_TO_METADATA).toUri().toString()); + WorkspaceFolder workspaceFolder = new WorkspaceFolder(Absolute.path(PATH_TO_METADATA).toUri().toString(), "test"); List workspaceFolders = List.of(workspaceFolder); params.setWorkspaceFolders(workspaceFolders);