vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
895 stars 56 forks source link

Add API to get Hilla version during runtime #1022

Open taefi opened 1 year ago

taefi commented 1 year ago

Similar to what is offered via Platform.getVaadinVersion() it is handy to have something similar to get the Hilla version.

mvysny commented 1 year ago

I've just realized that Platform.getVaadinVersion() actually returns Hilla version instead of Vaadin version if Hilla is on the classpath, since Hilla also fills in its version into the vaadin-core-versions.json file. Not sure whether that's intended, or accidental functionality that might be changed in the future...

tarekoraby commented 1 year ago

I've just realized that Platform.getVaadinVersion() actually returns Hilla version instead of Vaadin version if Hilla is on the classpath

It returns the Hilla version even in hybrid Flow + Hilla apps?

mvysny commented 1 year ago

In a hybrid app, I think the function will return either Vaadin or Hilla version randomly, depending on the classpath order (whichever jar with vaadin-core-versions.json is first on the classpath).

mvysny commented 1 year ago

Such a behavior is probably unwanted, perhaps I should create a ticket in vaadin/flow repo @tarekoraby ?

mvysny commented 1 year ago

Submitted as https://github.com/vaadin/flow/issues/17017