Skip to content

Revert "Reduce complexity in dependencies setup"#15191

Merged
Siedlerchr merged 1 commit intomainfrom
revert-15169-reduce-complexity-in-dependencies-setup
Feb 22, 2026
Merged

Revert "Reduce complexity in dependencies setup"#15191
Siedlerchr merged 1 commit intomainfrom
revert-15169-reduce-complexity-in-dependencies-setup

Conversation

@Siedlerchr
Copy link
Copy Markdown
Member

Reverts #15169

Breaks starting of jabref gui

@Siedlerchr Siedlerchr merged commit eb08ca0 into main Feb 22, 2026
46 of 53 checks passed
@Siedlerchr Siedlerchr deleted the revert-15169-reduce-complexity-in-dependencies-setup branch February 22, 2026 15:59
@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Revert "Reduce complexity in dependencies setup" and restore module configuration

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Revert complexity reduction in module dependencies setup
• Restore explicit module requirements removed in previous commit
• Fix module-info declarations across all JabRef modules
• Migrate from testModuleInfo DSL to javaModuleTesting.whitebox API
• Consolidate build.gradle.kts dependency declarations
• Remove unused dependency analysis plugin and custom metadata rules
Diagram
flowchart LR
  A["Previous Simplified<br/>Module Setup"] -->|Revert| B["Restored Explicit<br/>Module Requirements"]
  B --> C["Updated module-info.java<br/>Files"]
  B --> D["Migrated testModuleInfo<br/>to javaModuleTesting"]
  B --> E["Consolidated build.gradle.kts<br/>Dependencies"]
  C --> F["Fixed GUI Startup<br/>Issues"]
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/module-info.java ⚙️ Configuration changes +9/-11

Restore explicit module requirements and Lucene modules

jabgui/src/main/java/module-info.java


2. jabkit/src/main/java/module-info.java ⚙️ Configuration changes +8/-4

Add missing Guava and Lucene dependencies

jabkit/src/main/java/module-info.java


3. jablib/src/main/java/module-info.java ⚙️ Configuration changes +42/-37

Restore transitive and runtime module declarations

jablib/src/main/java/module-info.java


View more (25)
4. jabls-cli/src/main/java/module-info.java ⚙️ Configuration changes +2/-6

Add transitive module requirements for jablib and jabls

jabls-cli/src/main/java/module-info.java


5. jabls/src/main/java/module-info.java ⚙️ Configuration changes +5/-5

Remove transitive modifiers and add websocket module

jabls/src/main/java/module-info.java


6. jabsrv-cli/src/main/java/module-info.java ⚙️ Configuration changes +24/-3

Add transitive requirements and expand module declarations

jabsrv-cli/src/main/java/module-info.java


7. jabsrv/src/main/java/module-info.java ⚙️ Configuration changes +19/-16

Remove transitive modifiers and add service provider

jabsrv/src/main/java/module-info.java


8. test-support/src/main/java/module-info.java ⚙️ Configuration changes +5/-9

Remove transitive modifiers from test dependencies

test-support/src/main/java/module-info.java


9. build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt Miscellaneous +0/-55

Delete custom JDK jsobject metadata rule file

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt


10. build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts ⚙️ Configuration changes +127/-75

Simplify dependency rules and remove custom metadata logic

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts


11. build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts ⚙️ Configuration changes +3/-25

Remove dependency configuration and target classpath setup

build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts


12. build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts Formatting +2/-2

Update checkstyle report configuration syntax

build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts


13. build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts ⚙️ Configuration changes +0/-3

Remove dependency analysis plugin configuration

build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts


14. build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts ⚙️ Configuration changes +0/-20

Simplify test suite configuration and remove junit customization

build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts


15. build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts ⚙️ Configuration changes +0/-1

Remove dependency analysis plugin from module configuration

build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts


16. jabgui/build.gradle.kts Dependencies +144/-14

Add explicit dependencies and migrate test module configuration

jabgui/build.gradle.kts


17. jabkit/build.gradle.kts Dependencies +73/-9

Add explicit dependencies and migrate test module configuration

jabkit/build.gradle.kts


18. jablib/build.gradle.kts Dependencies +240/-57

Add comprehensive dependency declarations and test configuration

jablib/build.gradle.kts


19. jabls-cli/build.gradle.kts Dependencies +33/-5

Add explicit dependencies and update application configuration

jabls-cli/build.gradle.kts


20. jabls/build.gradle.kts Dependencies +18/-4

Add explicit dependencies and migrate test configuration

jabls/build.gradle.kts


21. jabsrv-cli/build.gradle.kts Dependencies +86/-5

Add comprehensive dependencies and update application setup

jabsrv-cli/build.gradle.kts


22. jabsrv/build.gradle.kts Dependencies +65/-9

Add explicit dependencies and migrate test configuration

jabsrv/build.gradle.kts


23. test-support/build.gradle.kts Dependencies +27/-0

Add explicit test support dependencies

test-support/build.gradle.kts


24. versions/build.gradle.kts Dependencies +23/-4

Add explicit platform and dependency declarations

versions/build.gradle.kts


25. .github/actions/setup-gradle/action.yml ⚙️ Configuration changes +1/-1

Downgrade TestLens setup action version

.github/actions/setup-gradle/action.yml


26. .github/workflows/tests-code.yml ⚙️ Configuration changes +0/-13

Remove dependency scopes verification workflow job

.github/workflows/tests-code.yml


27. gradle/modules.properties Miscellaneous +0/-19

Delete module name mapping properties file

gradle/modules.properties


28. jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java ✨ Enhancement +4/-3

Replace for loop with Kotlin IntRange forEach

jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (5) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Commented-out jacoco block 📘 Rule violation ✓ Correctness
Description
A commented-out jacoco configuration block was added, leaving dead code in the build script. This
reduces maintainability and violates the requirement to remove commented-out code.
Code

jablib/build.gradle.kts[R240-244]

+/*
+jacoco {
+    toolVersion = "0.8.13"
+}
+ */
Evidence
PR Compliance ID 22 forbids adding/keeping commented-out code. The jablib/build.gradle.kts change
introduces a commented-out jacoco block.

AGENTS.md
jablib/build.gradle.kts[240-244]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A commented-out `jacoco` configuration block was added to the build script, which is dead code.

## Issue Context
The compliance checklist requires removing commented-out code instead of keeping disabled blocks in source.

## Fix Focus Areas
- jablib/build.gradle.kts[240-244]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. // PATCH REASON: has no reason 📘 Rule violation ✓ Correctness
Description
An incomplete comment (// PATCH REASON:) was added without any explanation of intent/why. This is
a trivial comment that harms readability.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[R527-528]

+        // PATCH REASON:
        exports("com.sun.javafx.scene.control")
Evidence
PR Compliance ID 22 requires comments to add value (the why) and avoid trivial/unhelpful comments.
The added comment announces a patch reason but provides none.

AGENTS.md
build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[527-528]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
An incomplete/trivial comment was added (`// PATCH REASON:`) without stating the actual reason.

## Issue Context
Comments should explain intent/why; placeholders reduce code clarity and violate the project&#x27;s comment guidelines.

## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[527-528]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Missing java.desktop require 🐞 Bug ✓ Correctness
Description
jabsrv code imports java.awt.* (java.desktop) but module-info no longer requires java.desktop, which
should break JPMS compilation/module resolution. This is a hard failure (not just a logging/behavior
change).
Code

jabsrv/src/main/java/module-info.java[R19-31]

+    requires javafx.base;

    // For CAYW feature
    requires transitive javafx.graphics;
    requires transitive javafx.controls;
    requires afterburner.fx;
-    requires java.desktop;

    // For ServiceLocatorUtilities.createAndPopulateServiceLocator()
-    requires /*runtime*/ org.glassfish.hk2.locator;
+    requires org.glassfish.hk2.locator;
+    uses org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl;

-    requires transitive org.jabref.jablib;
+    requires org.jabref.jablib;

-    requires transitive org.slf4j;
Evidence
The module descriptor for org.jabref.jabsrv does not declare java.desktop, yet jabsrv contains code
using AWT Clipboard/Toolkit which resides in the java.desktop module; without reading java.desktop,
the package is not accessible in JPMS builds.

jabsrv/src/main/java/module-info.java[19-31]
jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java[3-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`org.jabref.jabsrv` uses AWT (`java.awt.*`) but its `module-info.java` does not read the `java.desktop` module. Under JPMS this causes compilation/module resolution errors (e.g., `package java.awt is not visible`).

### Issue Context
The CAYW endpoint (`CAYWResource`) uses `java.awt.Toolkit` and `java.awt.datatransfer.*`.

### Fix Focus Areas
- jabsrv/src/main/java/module-info.java[19-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. Typo in TODO comment 📘 Rule violation ✓ Correctness
Description
The comment contains a typographical error (Somwewhere), reducing professionalism and clarity in
modified documentation text. This violates the requirement to fix typos in changed comments.
Code

jablib/build.gradle.kts[R108-109]

+    // TODO: Somwewhere we get a warning: unknown enum constant Id.CLASS reason: class file for com.fasterxml.jackson.annotation.JsonTypeInfo$Id not found
+    // implementation("com.fasterxml.jackson.core:jackson-annotations:2.19.1")
Evidence
PR Compliance ID 35 requires changed comments/documentation to be free of obvious typos. The
modified comment includes the typo Somwewhere.

jablib/build.gradle.kts[108-109]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A modified TODO comment contains a typo (`Somwewhere`).

## Issue Context
The compliance checklist requires fixing typos in modified comments/documentation.

## Fix Focus Areas
- jablib/build.gradle.kts[108-109]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Unrelated checkstyle report reformat 📘 Rule violation ⛯ Reliability
Description
The checkstyle report configuration was changed in a formatting-only way (= false to
.set(false)) without apparent functional changes. This increases diff size and reduces
reviewability.
Code

build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts[R12-13]

+        xml.required.set(false)
+        html.required.set(true)
Evidence
PR Compliance ID 9 requires avoiding formatting-only/unrelated reformatting changes. The modified
lines only change Gradle Kotlin DSL assignment style for the same values.

AGENTS.md
build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts[12-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A formatting-only change was made to the checkstyle reports configuration, increasing diff noise.

## Issue Context
This PR is a revert to fix runtime behavior; unrelated formatting-only edits should be avoided to keep the diff minimal.

## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts[12-13]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Stray semicolons in Kotlin DSL 📘 Rule violation ✓ Correctness
Description
Semicolons were introduced in Kotlin DSL statements, which conflicts with typical Kotlin/JabRef
style and reduces consistency. This should be cleaned up to follow the project's code style
guidance.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[R519-520]

+        requiresTransitive("javafx.base");
+        requiresTransitive("javafx.graphics");
Evidence
PR Compliance ID 11 requires adherence to JabRef code style rules. The modified Kotlin DSL lines
include unnecessary trailing semicolons.

AGENTS.md
build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[519-520]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Unnecessary semicolons were introduced in Kotlin DSL code.

## Issue Context
Kotlin code style typically avoids semicolons; keeping style consistent improves readability and aligns with JabRef code style rules.

## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[519-520]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (2)
7. CLI tinylog not resolved 🐞 Bug ✧ Quality
Description
jabls-cli and jabsrv-cli are configured as modular applications (mainModule set) and include tinylog
binding jars, but their module-info files don’t require any tinylog modules. This can result in
SLF4J falling back to NOP/no provider when launching via java --module, reducing observability.
Code

jabls-cli/src/main/java/module-info.java[R7-13]

    requires afterburner.fx;

    requires org.slf4j;
    requires jul.to.slf4j;
-    requires /*runtime*/ org.tinylog.api;
-    requires /*runtime*/ org.tinylog.impl;
-    requires /*runtime*/ org.apache.logging.log4j.to.slf4j;
-    requires /*runtime*/ org.tinylog.api.slf4j;

    requires info.picocli;
}
Evidence
Both CLIs set application.mainModule, meaning they are started as JPMS root modules. They depend
on SLF4J + JUL bridge and ship tinylog backend dependencies, but their module descriptors don’t
read/resolve the tinylog modules, so the provider modules may not be in the resolved module layer at
runtime.

jabls-cli/build.gradle.kts[15-18]
jabls-cli/build.gradle.kts[49-55]
jabls-cli/src/main/java/module-info.java[9-13]
jabls-cli/src/main/java/org/jabref/languageserver/cli/ServerCli.java[9-27]
jabsrv-cli/build.gradle.kts[49-55]
jabsrv-cli/src/main/java/module-info.java[7-12]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The CLI entrypoints are started as named modules (`mainModule` is set) and rely on SLF4J + JUL bridge, but their `module-info.java` files do not require the tinylog backend modules that are present on the module path. In modular launches, this can prevent the SLF4J provider modules from being resolved.

### Issue Context
`jabls-cli` and `jabsrv-cli` both ship `slf4j-tinylog` and `tinylog-impl` dependencies.

### Fix Focus Areas
- jabls-cli/src/main/java/module-info.java[1-15]
- jabsrv-cli/src/main/java/module-info.java[1-25]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. jablib missing transitive reexport 🐞 Bug ⛯ Reliability
Description
jablib exports APIs whose public types include JavaFX (javafx.beans.*) and EasyBind
(OptionalBinding) types, but its module-info no longer re-exports these dependencies (`requires
transitive removed). This forces all modular consumers to add extra requires` or they may fail to
compile when using those APIs.
Code

jablib/src/main/java/module-info.java[R126-132]

    requires java.base;

-    requires transitive javafx.base;
+    requires javafx.base;
+    requires javafx.graphics; // because of javafx.scene.paint.Color
    requires afterburner.fx;
-    requires transitive com.tobiasdiez.easybind;
+    requires com.tobiasdiez.easybind;
Evidence
jablib exports packages containing FilePreferences and BibEntry. Both expose external-module
types in public signatures (JavaFX properties and EasyBind bindings). Without requires transitive,
any downstream module using these APIs must itself requires javafx.base / `requires
com.tobiasdiez.easybind`, which can be a breaking change for existing modular consumers.

jablib/src/main/java/module-info.java[2-4]
jablib/src/main/java/module-info.java[27-29]
jablib/src/main/java/module-info.java[126-132]
jablib/src/main/java/org/jabref/logic/FilePreferences.java[89-104]
jablib/src/main/java/org/jabref/model/entry/BibEntry.java[1102-1111]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`org.jabref.jablib` exports public APIs that expose JavaFX and EasyBind types (e.g., `StringProperty`, `OptionalBinding`), but it does not re-export those modules transitively. This can break or complicate downstream JPMS consumers.

### Issue Context
Examples: `FilePreferences` returns `StringProperty`; `BibEntry` returns `OptionalBinding&lt;String&gt;`.

### Fix Focus Areas
- jablib/src/main/java/module-info.java[126-135]
- jablib/src/main/java/org/jabref/logic/FilePreferences.java[85-115]
- jablib/src/main/java/org/jabref/model/entry/BibEntry.java[1100-1112]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread jablib/build.gradle.kts
Comment on lines +240 to +244
/*
jacoco {
toolVersion = "0.8.13"
}
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Commented-out jacoco block 📘 Rule violation ✓ Correctness

A commented-out jacoco configuration block was added, leaving dead code in the build script. This
reduces maintainability and violates the requirement to remove commented-out code.
Agent Prompt
## Issue description
A commented-out `jacoco` configuration block was added to the build script, which is dead code.

## Issue Context
The compliance checklist requires removing commented-out code instead of keeping disabled blocks in source.

## Fix Focus Areas
- jablib/build.gradle.kts[240-244]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +527 to 528
// PATCH REASON:
exports("com.sun.javafx.scene.control")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. // patch reason: has no reason 📘 Rule violation ✓ Correctness

An incomplete comment (// PATCH REASON:) was added without any explanation of intent/why. This is
a trivial comment that harms readability.
Agent Prompt
## Issue description
An incomplete/trivial comment was added (`// PATCH REASON:`) without stating the actual reason.

## Issue Context
Comments should explain intent/why; placeholders reduce code clarity and violate the project's comment guidelines.

## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[527-528]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +19 to 31
requires javafx.base;

// For CAYW feature
requires transitive javafx.graphics;
requires transitive javafx.controls;
requires afterburner.fx;
requires java.desktop;

// For ServiceLocatorUtilities.createAndPopulateServiceLocator()
requires /*runtime*/ org.glassfish.hk2.locator;
requires org.glassfish.hk2.locator;
uses org.jvnet.hk2.external.generator.ServiceLocatorGeneratorImpl;

requires transitive org.jabref.jablib;
requires org.jabref.jablib;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Missing java.desktop require 🐞 Bug ✓ Correctness

jabsrv code imports java.awt.* (java.desktop) but module-info no longer requires java.desktop, which
should break JPMS compilation/module resolution. This is a hard failure (not just a logging/behavior
change).
Agent Prompt
### Issue description
`org.jabref.jabsrv` uses AWT (`java.awt.*`) but its `module-info.java` does not read the `java.desktop` module. Under JPMS this causes compilation/module resolution errors (e.g., `package java.awt is not visible`).

### Issue Context
The CAYW endpoint (`CAYWResource`) uses `java.awt.Toolkit` and `java.awt.datatransfer.*`.

### Fix Focus Areas
- jabsrv/src/main/java/module-info.java[19-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Siedlerchr added a commit that referenced this pull request Feb 22, 2026
* main:
  Revert "Reduce complexity in dependencies setup (#15169)" (#15191)
  Fix compilation
  Fix heylogs test
Siedlerchr added a commit to LoayTarek5/jabref that referenced this pull request Feb 23, 2026
…les-wizard-12709

* upstream/main: (106 commits)
  Merge common gating parts into composite action (JabRef#15197)
  Support protected institutional authors in PersonNamesChecker (JabRef#15175)
  adapt wix (JabRef#14969)
  Improve CI (JabRef#15189)
  Revert "Reduce complexity in dependencies setup (JabRef#15169)" (JabRef#15191)
  Fix compilation
  Fix heylogs test
  Fix icon on Linux (JabRef#15188)
  chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.5 (JabRef#15178)
  New Crowdin updates (JabRef#15173)
  Reduce complexity in dependencies setup (JabRef#15169)
  Start new development cycle
  snapcraft
  snapcraft
  use snapctl
  update metadata fiels
  try with  mesa candidate
  fix snapcraft and skmanrc to use correct version
  Release v6.0-alpha.5
  chore(sbom): update CycloneDX SBOM files (JabRef#15172)
  ...
RakockiW pushed a commit to RakockiW/jabref that referenced this pull request Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant