Build and test stability in branch "main"

Hello everyone,

I am adding a language module for Sardinian, in its two macro-varieties, to LanguageTool. I have created a fork and branched out of “main” and I am following the development guidelines.

However, I am finding many (more or less) sporadic build and test issues. This is slowing down my development considerably. Also, everytime I want to build and test my module and I run ./ sc package test, Maven has to rebuild the whole thing again.

I might be doing something wrong. Do you have any suggestions? Should I have branched from somewhere else?

Hi Andria, the build should be stable, what kind of issues do you see?

/ sv package test (sv = Swedish is a language with few tests) takes 10-15 seconds on my computer. How long does it take for you with sc and with sv?

It takes at least 15m on my setup. It seems it finds a reason to rebuild languagetool-core everytime.

The failures are often about not finding XML or TXT files, especially in tests. Whenever I run mvn clean package or similar, the issues randomly appear somewhere else.

I am using WSL2, my MAVEN_OPTS is set to -Xmx1550m.

$ java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u372-ga~us1-0ubuntu1~20.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
~$ mvn --version
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: /usr/local/apache-maven-3.8.7
Java version: 1.8.0_362, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "", arch: "amd64", family: "unix"

Maybe WSL2 slows down everything? Does increasing the value for -Xmx1550m to e.g. 2500 help?

No, that doesn’t seem to change anything.

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ languagetool-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 323 source files to /mnt/c/.....

The fact that languagetool-core is always triggered even if I don’t touch anything is fishy. Maybe it’s something about filesystems? I’ll check and report in case it helps anybody else having similar issues.

languagetool-core can be triggered, its tests are fast. So there seems to be a more general issue with performance on your system.

Alright, as I suspected the problem was with the filesystem. Moving the project under the home fixed the sporadic failures and made the build much faster. The whole lot takes about 10 minutes now.

I guess this is a cautionary tale for anybody developing on WSL. Thank you Daniel.

It sounds like the behaviour of a very slow USB disk or when a network filesystem is used?

WSL and “normal” Windows use two different filesystems, and the problem arises when WSL is working on a “normal” Windows folder.

This is sorted now: I’ve simply moved all development to WSL only.

1 Like