Visitar URL original
GH-1451: Share staged install, checksum and tar helpers across the dictionary installers by rzo1 · Pull Request #1452 · apache/opennlp · GitHub
Skip to content

GH-1451: Share staged install, checksum and tar helpers across the dictionary installers - #1452

Merged
rzo1 merged 3 commits into
mainfrom
gh-runtime-installer-cleanup
Oct 9, 2026
Merged

rzo1 merged 3 commits into
mainfrom
gh-runtime-installer-cleanup

Conversation

@rzo1

@rzo1 rzo1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The MeCab dictionary installer now uses the same staged install as ResourceInstaller, with one shared checksum helper and the empty tar check in TarStream. DictionaryCatalog.install gains an overload that takes an explicit opt-in and Limits instead of relying only on the JVM-wide opennlp.download.remote property. Against 3.0.0-M6, HunspellDictionaryDownload.downloadFromCatalog is renamed to HunspellDictionaryInstaller.installFromCatalog to match the MeCab entry point.

Fixes #1451

…ctionary installers

- MecabDictionaryInstaller installs through an internal
  ResourceInstaller.installSelected staging hook instead of its own scratch,
  promote and delete code; selected destinations must stay inside the target
- One package-private Checksums helper for ResourceInstaller, DownloadUtil and
  DictionaryCatalog
- DictionaryCatalog.install overload with an explicit opt-in and Limits
- Empty tar detection moved to TarStream
- HunspellDictionaryDownload.downloadFromCatalog renamed to
  HunspellDictionaryInstaller.installFromCatalog (breaking against 3.0.0-M6)
@rzo1 rzo1 added this to the 3.0.0 milestone Oct 8, 2026
@rzo1 rzo1 added the component: stemmer Stemmers (Snowball, Porter, Hunspell) label Oct 8, 2026
@rzo1 rzo1 self-assigned this Oct 8, 2026
A path such as \x is not absolute on Windows but resolves to the root of the
target's drive. The test now expects the platform's path separator in the message.

@mawiesne mawiesne 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.

Thx for the PR. Left two minor comments for improvements, non-blocking but might be worth addressing with this PR.
Otherwise: Good set of changes with many improvements code- and clarity-wise.

The added and enhanced tests tighten the scenario with good checks and relevant examples. Nice!

@mawiesne mawiesne added java Pull requests that update Java code tests Pull requests that add or update test code improvement Enhancement of existing behavior (Jira: Improvement) labels Oct 8, 2026
Rename TarStream.startsWithEndOfArchive to isEmptyArchive and describe what it detects.
Replace the path character literals in ResourceInstaller with named constants.
@rzo1
rzo1 merged commit 7794208 into main Oct 9, 2026
10 checks passed
@krickert
krickert deleted the gh-runtime-installer-cleanup branch October 11, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: stemmer Stemmers (Snowball, Porter, Hunspell) improvement Enhancement of existing behavior (Jira: Improvement) java Pull requests that update Java code tests Pull requests that add or update test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share one staged install path across the MeCab and Hunspell dictionary installers

3 participants