Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Still issues with multiple Guava versions ... still time to fix them

Hi

I am not a class loader expert, so what I write is based on making sense of observations.

Perhaps the two scenarios are the same.

----

The explicit re-export is obviously bad since it forces everyone else to use that version.

From : https://wiki.eclipse.org/Version_Numbering#How_to_specify_versions_when_plug-ins_re-export_other_plug-ins

Exporting a version range that spans multiple major versions of a plug-in is not recommended, because it forces downstream plug-ins to support versions with arbitrary breaking changes between them.

Exporting just 15 would be restrictive. Exporting 10 to 15 would conflict with the guidance.

----

The subtle class load dependency is where the problem is actually coming from.

The following is, I think an example of a subtle class load dependency.

class Mine implements SomeGuavaClass
{
    private static AnotherGuavaClass useful = new AnotherGuavaClass();
...
}

so even though Guava is not exported, loading Mine, which is exported, causes SomeGuavaClass and AnotherGuavaClass to be loaded by the overall class loader, which may have a problem if a different version of SomeGuavaClass is similarly loaded on behalf of some other component.

    Regards

        Ed Willink

On 02/06/2014 12:51, Igor Fedorenko wrote:


On 2014-06-02, 5:31, Ed Willink wrote:
a) Guava must not be exported and so avoid OSGI class loader confusion.
- API tooling could warn if any non-singleton plugin is exported.

b) Requirements to load Guava classes must not be exported
- API tooling could warn if a class in a non-singleton plugin is
externally class loadable


It's Monday morning and I certainly didn't get enough caffeine in my
bloodstream yet, but I don't see the difference between these two
points. Can you explain what you mean by "externally class loadable" and
how it is different from OSGi Export-Package?

--
Regards,
Igor

_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4592 / Virus Database: 3955/7606 - Release Date: 06/02/14




Back to the top