Skip to content

[FEA] Expand/customize dependecy loading introduced in fat-jars to work with the slim-jar too #1321

@ldematte

Description

@ldematte

#1296 introduced "fat-jars": jars with embedded native dependencies.
In order for them to work, a OptionalNativeDependencyLoader, which extracts the dependencies to a tmp folder and loads them in reverse order, is introduced.
OptionalNativeDependencyLoader is invoked inside JDKProvider, before any native cuvs functions is invoked from Java, to preemptively load the native libraries from the desired binaries.

In parallel, in #1316 we are trying to do something similar/related: we try to load in the "regular" way libcuvs, to see if the load fails; if it does, we switch to the UnsupportedProvider to give users a meaningful and precise error message. Very similarly, this is done inside JDKProvider, before any native cuvs functions is invoked in Java.

We should come up with a unified mechanism, where OptionalNativeDependencyLoader tries to load the native library (libraries) in different ways based on whether we are in a fat-jar or slim-jar, to give users precise error messages for the 2 different cases.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions