vaadin / multiplatform-runtime

4 stars 1 forks source link

Vaadin 8 prints warning: Vaadin depends on Atmosphere 2.4.30.slf4jvaadin1 but version 2.4.30.vaadin1 was found. #77

Closed mvysny closed 3 years ago

mvysny commented 4 years ago

MPR 2.0.5, Vaadin 8.11.3, Vaadin 14.3.5.

When using MPR, Vaadin 8 will print the following warning message:

WARN  com.vaadin.flow.server.VaadinService - 
=================================================================
Vaadin depends on Atmosphere 2.4.30.slf4jvaadin1 but version 2.4.30.vaadin1 was found.
This might cause compatibility problems if push is used.
=================================================================

Vaadin 14 depends on atmosphere-runtime version 2.4.30.slf4jvaadin1 while Vaadin 8 still depends on the older version 2.4.30.vaadin1. Is the newer version fully backwards compatible so that I can use it also with Vaadin 8? As far as I can see the older version depends on com.vaadin.external.org.slf4j while the newer version depends on org.slf4j.

It would be great if Vaadin could confirm that that's the only change and that it will not cause any unpredictable problems on the existing Vaadin 8 UIs. Alternatively, if this is fine, MPR could make Vaadin 8 to not to log the warning message anymore.

TatuLund commented 4 years ago

When taking MPR into use with Vaadin 8 project, you should remove "vaadin-push" dependency. Vaadin 8 Push is not used, since all Push activity is routed via Flow server and Flow version of Push implementation should be used. Normally flow-push is included in Vaadin BOM and no separate dependency is needed. Question is, is this piece of information missing in the documentation?

mvysny commented 4 years ago

imho Vaadin 8 complains about the version of the atmosphere library. vaadin-push transitively depends on atmosphere 2.4.30.slf4jvaadin1 and that's what Vaadin 8 expects. Yet flow-push depends on atmosphere 2.4.30.vaadin1 and thanks to Vaadin BOM that one gets picked. Removing vaadin-push will not change atmosphere version, and hence will not prevent Vaadin 8 from complaining about the atmosphere version.

I temporarily removed vaadin-push from vaadin14-mpr-gradle-demo project, yet the warning message is still logged into the console, since com.vaadin.external.atmosphere:atmosphere-runtime:2.4.30.slf4jvaadin1 is used.

caalador commented 4 years ago

This would need changes to the Framework side as it's a static call on VaadinService creation private boolean atmosphereAvailable = checkAtmosphereSupport(); where private static boolean checkAtmosphereSupport() {

pleku commented 4 years ago

Apparently fixed on FW8 side as the check is now done later on.

caalador commented 4 years ago

Mpr needs to override the method so that the FW one is not executed.