[
https://issues.apache.org/jira/browse/NUTCH-3130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116949#comment-18116949
]
ASF GitHub Bot commented on NUTCH-3130:
---------------------------------------
lewismc opened a new pull request, #967:
URL: https://github.com/apache/nutch/pull/967
Updated PR for
[NUTCH-3130](https://issues.apache.org/jira/browse/NUTCH-3130) which replaces
stale https://github.com/apache/nutch/pull/869
#869 had drifted: it was branched before master moved to Java 17 only and
before the REST service was removed, so a large part of its diff was either
already applied or no longer applied cleanly. Rather than rebase a stale branch
with a long merge history, this is a fresh branch against current master
containing only the work that still matters.
The scope is deliberately narrower than #869. Two changes there were never
settled in review and are left out: removing `finalize()` from `Plugin`,
`PluginRepository` and `Ftp` (neither @sebastian-nagel nor I could show that
plugin and FTP shutdown still happen without it), and swapping
`SpellCheckedMetadata` for `CaseInsensitiveMetadata` in the protocol plugins,
which changes HTTP header handling and belongs with NUTCH-3002. Both should be
follow-up issues.
What remains is the mechanical work plus the CI gate. Deprecated API calls
are replaced: commons-cli `OptionBuilder`/`GnuParser` become `Option.builder`
and `DefaultParser`, `GeoIPDocumentCreator` uses the geoip2 5.x accessors, and
`SpellCheckedMetadata` uses commons-text for Levenshtein distance with the same
threshold and the same behaviour. Any deprecated Nutch API that is unused or
long past it's removal date is deleted: `IndexWriter.open(Configuration,
String)` (deprecated since 1.15) and its plugin stubs, the old
`net.protocols.ProtocolException`, and two unused overloads in `Generator` and
`CommonCrawlFormatFactory`. Deprecated API's we are keeping now says in Javadoc
what to use instead.
The "Check for deprecation warnings" step in the GitHub Actions workflow
from #869 is kept, with two fixes: it skips cleanly when no test compile ran
instead of reporting a green pass, and the allowlist is rebuilt from what
actually still warns on master rather than being carried over verbatim.
Removing `IndexWriter.open(Configuration, String)` is a breaking change for
out-of-tree index writer plugins, which must implement only
`open(IndexWriterParams)`. Everything else is reversible. We can call this out
in the 1.24 release notes.
> Address deprecated API usage across Nutch codebase and build
> ------------------------------------------------------------
>
> Key: NUTCH-3130
> URL: https://issues.apache.org/jira/browse/NUTCH-3130
> Project: Nutch
> Issue Type: Improvement
> Components: build, ci/cd, dependency
> Affects Versions: 1.21
> Reporter: Lewis John McGibbney
> Assignee: Lewis John McGibbney
> Priority: Major
> Fix For: 1.24
>
>
> A long time ago I performed a similar task
> (https://issues.apache.org/jira/browse/NUTCH-1273) to address all deprecation
> warnings flagged across the Nutch codebase.
> This time around I want to do the same but also plan to include a deprecation
> check as part of GitHub CI so we keep on top of deprecation issues into the
> future.
> Patch coming up.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)