Skip to content

fix(struct): exclude optional word from runtime - #3295

Merged
imbajin merged 1 commit into
masterfrom
fix/server-word-optional
Oct 9, 2026
Merged

imbajin merged 1 commit into
masterfrom
fix/server-word-optional

Conversation

@imbajin

@imbajin imbajin commented Oct 9, 2026

Copy link
Copy Markdown
Member

Purpose of the PR

Standard distributions bundled GPLv3-only word:1.3 even when its optional analyzer was unused. They now omit that library and its unused runtime dependencies. Users can still install Word separately when explicitly selecting it.

Main Changes

  • Keep Word as a provided compile/test dependency and update the actual runtime/shipped inventory.
  • Report a missing Word dependency with a configuration error that preserves the cause.
  • Document the external GPLv3 library's download, installation and analyzer configuration.

Verifying these changes

  • Need tests and can be verified as follows:
    • Formatting, clean Java 17 reactor compilation, fresh Git source-archive builds and exact dependency collection passed.
    • Struct and Server analyzer tests passed; real packages support standard analyzers without Word and English/Chinese Word segmentation after installing only its external JAR.
    • Source-built and binary packages separately passed authenticated Server/Gremlin, Client CRUD, ordinary Loader import/readback, Tools query/backup and Hubble checks, with shutdown. Automated package checks passed; manual license review remains part of release verification.

Does this PR potentially affect the following parts?

  • Dependencies
  • Modify configurations
  • The public API
  • Other affects: the optional Word analyzer requires a separately installed runtime library.
  • Nope

Documentation Status

  • Doc - TODO
  • Doc - Done: docs/BUILDING.md.
  • Doc - No Need

Related release validation: apache/hugegraph-doc#512.
Related Toolchain SDK packaging: apache/hugegraph-toolchain#794.
Validation uses unsigned local packages; real RC signatures and remote Maven staging remain separate gates.

- keep word as a provided compile and test dependency
- omit word and its unused runtime transitives from packages
- report a missing optional analyzer dependency clearly
- document external installation and test both classpaths
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.88%. Comparing base (5039e5b) to head (83e1284).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3295      +/-   ##
============================================
+ Coverage     41.87%   41.88%   +0.01%     
- Complexity     6969     6971       +2     
============================================
  Files           768      768              
  Lines         66436    66436              
  Branches       8831     8831              
============================================
+ Hits          27823    27830       +7     
+ Misses        35468    35466       -2     
+ Partials       3145     3140       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin
imbajin marked this pull request as ready for review October 9, 2026 03:59

@bitflicker64 bitflicker64 left a comment

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.

Blocking: no. Summary: Moving org.apdplat:word:1.3 to provided scope correctly drops the GPLv3 jar and its runtime transitives from the distribution, and the factory now reports a missing jar as a ConfigException with the cause kept; the only gap is that the release LICENSE and licenses/ directory still declare the transitives this change stops shipping. Evidence: read the exact-head diff of all 6 files plus WordAnalyzer.java and regenerate_known_dependencies.sh (runtime-scope copy-dependencies); grep of install-dist/release-docs/LICENSE and install-dist/release-docs/licenses/ at 83e1284; every latest-head check passes, including dependency-check, check-license and the struct and server suites.

Comment thread hugegraph-struct/pom.xml
<artifactId>word</artifactId>
<version>1.3</version>
<!-- External optional analyzer; compile/test it without shipping it. -->
<scope>provided</scope>

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.

Minor: With word in provided scope, this PR removes commons-pool2-2.0, jedis-2.5.1, lucene-backward-codecs-5.2.1, lucene-misc-5.2.1, lucene-suggest-5.2.1 and pinyin4j-2.5.0 from known-dependencies.txt, so the binary package no longer ships them. install-dist/release-docs/LICENSE still lists all six (lines 695, 697, 698, 702, 714 and 769), and install-dist/release-docs/licenses/ still holds LICENSE-commons-pool2-2.0.txt, LICENSE-jedis-2.5.1.txt, LICENSE-lucene-{backward-codecs,misc,suggest}-5.2.1.txt and LICENSE-pinyin4j-2.5.0.txt. That makes the release LICENSE disagree with the bundled jars, which release verification checks. Please remove those six LICENSE entries and their license text files in this PR, so the inventory and LICENSE change together.

@imbajin
imbajin merged commit 6885519 into master Oct 9, 2026
53 of 55 checks passed
@imbajin
imbajin deleted the fix/server-word-optional branch October 9, 2026 06:52
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.

3 participants