-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft: add/move hilla dependencies #4953
Conversation
vaadin-core-internal/pom.xml
Outdated
@@ -209,6 +209,11 @@ | |||
<artifactId>vaadin-menu-bar-flow</artifactId> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>com.vaadin.hilla</groupId> | |||
<artifactId>hilla</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to add hilla
to vaadin
until at least we don't have a split for core and all react components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the idea to add hilla
to vaadin-spring-boot-starter
looks not that bad to me now. As Jakarta EE and Quarkus users can just not add vaadin-spring-boot-starter
to their pom.xml and they won't have Spring and Hilla then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also make it pretty easy to exclude hilla by not using vaadin-spring-boot-starter
because it is only a wrapper for vaadin-spring
, vaadin-core
and hilla
. So the flow developer only has to add vaadin-spring
and vaadin-core
if they don't wanna deal with exclusions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also give easy option to divide it in two platform modules like vaadin-spring-boot-starter
and vaadin-hilla-spring-boot-starter
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to use one dependency vaadin-spring-boot-starter
and avoid "hilla" artifacts, so having a second one with the hilla in the middle is approx. the same as have old hilla-spring-boot-starter
.
vaadin-core-internal/pom.xml
Outdated
@@ -209,6 +209,11 @@ | |||
<artifactId>vaadin-menu-bar-flow</artifactId> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>com.vaadin.hilla</groupId> | |||
<artifactId>hilla</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think we have to make changes in hilla
artifact, so here are some possible actions:
pom.xml
can be retained as is inhilla
.@NpmPackage
annotations should be removed fromhilla
.hilla-react
can be just removed from Hilla as it has the same pom.xml ashilla
.hilla
then is added to Platform.
5. Flow adds these three react packages (Auto Crud etc.) ifreactRouterEnabled=true
otherwise it adds one lit form package (inNodeUpdater
class).
UPD: 5. Flow adds these three react packages (Auto Crud etc.) if reactRouterEnabled=true
and Hilla is used, otherwise, if reactRouterEnabled=false
and Hilla is used, it adds one lit form package. Else, if pure Flow app, it doesn't add these deps. Can be done in NodeUpdater
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flow adds these three react packages (Auto Crud etc.) if reactRouterEnabled=true otherwise it adds one lit form package (in NodeUpdater class).
I would vote against this; or add "if hilla is on the class path" - otherwise flow only apps gets react packages thanks to reactRouterEnabled=true as default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or add "if hilla is on the class path"
Yes, agree, that's a good point.
I proposed to remove npm package annotations and add packages imperatively in NodeUpdater, so that to relief developers from excluding artifacts by themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the wording for 5.
Build fails due to |
From vaadin-core-internal.
<!-- workaround,should be removed after this module has been added to hilla-bom --> | ||
<dependency> | ||
<groupId>com.vaadin.hilla</groupId> | ||
<artifactId>hilla-dev-mode</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I missed something important, but how with this structure one can exclude all development related dependencies in hybrid app ? I expected only one step as previously - excluding vaadin-dev
in pom.xml.
See my comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only a bom, which doesn't bring in any dependency directly, as it is only under dependencyManagement.
also for this case, it is a workaround as hilla-dev-mode
is not in hilla-bom
yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, agree, maybe this isn't a better place to ask this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, not clear to me how Hilla dev things should be excluded in prod mode, and should they even be excluded?
related to #4934 #4946