On 06.04.2023 13:56, Julian Reschke wrote:
Hi everybody,

as some have noticed, we have begun the migration away from Guava 15.0
to a *shaded* version of Guava (latest and greatest).

A new subproject has been added (oak-shaded-guava), which repackages
Guava 31 under the package name o.a.jackrabbit.guava. See
<https://issues.apache.org/jira/browse/OAK-9989> for details and
discussion.

If your IDE acts weird (be it Eclipse or IntelliJ), it's because it does
not understand the shaded subproject. Sorry for that. While there's no
fix for the IDEs, the workaround is to disable oak-shaded-guava
(Intellij) or remove it (Eclipse) - after having built it locally with
Maven.

We may decide at a later point to work around this by moving this out of
the reactor pom.

What's next?

1) We have a few sub projects that currently expose Guava in APIs; these
APIs have been deprecated for long, and I'll remove those APIs *after*
the next release (1.52.0).

2) In the meantime, everybody can help by converting "their" sub
projects. (If you do so, please add a sub-task to
<https://issues.apache.org/jira/browse/OAK-7182>). This usually means
adding the dependency to the POM, and rewriting import statements. I
usually just run:

~~~
#!/bin/bash

find . -name "*.java" -exec sed
"s/^import\scom\.google\.common\.\(.*;\)/import
org.apache.jackrabbit.guava.common.\1/g" -i {} ";"
find . -name "*.java" -exec sed
"s/^import\sstatic\scom\.google\.common\.\(.*;\)/import static
org.apache.jackrabbit.guava.common.\1/g" -i {} ";"
~~~

WARNING: this is destructive. Only run it on a Git checkout with no
local changes, and do not do it inside your project root. You have been
warned.

After running this, you may find that a Guava 15 method actually has
been removed. Usually googling for the method signature will tell you
what happened.
...

In the meantime, I have converted a good number of modules.

Namely missing are components from blobs, lucene, and sement storage,
where I would *really* appreciate that developers closer to that code
than me would step in.

For next week I'm planning to cut Oak 1.52.0. The plan is to remove
public APIs using native Guava by 1.54.0, and completely switch to
shaded Guava for internal use by 1.56.0.

Best regards, Julian

Reply via email to