Skip to content

docs(build): say why the okhttp dependency has no caller here - #201

Merged
marevol merged 1 commit into
build/exclude-gcs-grpcfrom
build/document-okhttp
Sep 9, 2026
Merged

marevol merged 1 commit into
build/exclude-gcs-grpcfrom
build/document-okhttp

Conversation

@marevol

@marevol marevol commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Stacked on #200.

Nothing in this repository imports okhttp3, in main or in test, so com.squareup.okhttp3:okhttp-jvm reads as dead weight in a dependency audit. It is not.

It is how Fess comes to ship okhttp 5.x in WEB-INF/lib. fess-ds-microsoft365 calls okhttp from its own code and deliberately does not shade it — its pom excludes the okhttp 4.12.0 that Kiota brings, with the comment:

Kiota pulls okhttp 4.12.0, but this plugin does not shade okhttp: at runtime it uses the okhttp-jvm 5.x that Fess supplies.

Deleting this declaration would break the Microsoft 365 data store with a NoClassDefFoundError at crawl time, and no test in this repository would catch it.

I nearly deleted it while auditing the distribution for unused jars — grep over this repo and over codelibs/fess found no caller. That is exactly the failure this comment exists to prevent. Comment only, no behaviour change.

Nothing in this repository imports okhttp3, in main or in test, so the
dependency reads as dead weight. It is not. It is how Fess comes to ship
okhttp 5.x in WEB-INF/lib, and fess-ds-microsoft365 calls okhttp from its own
code without shading it, excluding the okhttp 4.12.0 that Kiota brings so that
it runs on the copy Fess supplies.

Deleting it would break that plugin with a NoClassDefFoundError at crawl time,
and no test in this repository would catch it. I nearly deleted it while
auditing the distribution for unused jars, which is what this comment is for.
@marevol
marevol added this pull request to stack #202 September 9, 2026 12:29
@marevol marevol self-assigned this Sep 9, 2026
@marevol marevol added this to the 15.9.0 milestone Sep 9, 2026
@marevol
marevol merged commit 366362f into master Sep 9, 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