Skip to content
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

BrowserCallable-aware package handling in Flow #20983

Open
mshabarov opened this issue Feb 12, 2025 · 0 comments
Open

BrowserCallable-aware package handling in Flow #20983

mshabarov opened this issue Feb 12, 2025 · 0 comments
Assignees
Labels
enhancement hilla Issues related to Hilla

Comments

@mshabarov
Copy link
Contributor

Describe your motivation

Follow-up for #20289.

When Hilla's browser callable aka endpoints are present in a project, the Hilla TS endpoints generator packages have to be added.
Flow should know whether to add them during build time based on presence BrowserCallable / Endpoint annotated classes in a project.

Describe the solution you'd like

These annotations are Hilla owned, so there should be a new API to pass this flag from Hilla.
It could be a method like hasBrowserCallables() in EndpointGeneratorTaskFactory interface that calls BrowserCallableFinder internally or Hilla can make BrowserCallableFinder discoverable through lookup for Flow.

We have to change the ordering of node tasks in Flow from

TaskUpdatePackages.class,
TaskRunNpmInstall.class,
TaskGenerateOpenAPI.class,
TaskGenerateEndpoint.class,

to

TaskGenerateOpenAPI.class,
TaskUpdatePackages.class,
TaskRunNpmInstall.class,
TaskGenerateEndpoint.class,

(discover endpoints -> add generators if needed -> npm install -> generate endpoints if needed)

Describe alternatives you've considered

Revert the #20289 and document the workaround.

Additional context

Target version - 24.7

@mshabarov mshabarov added enhancement hilla Issues related to Hilla labels Feb 12, 2025
@mshabarov mshabarov moved this to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Feb 12, 2025
@mshabarov mshabarov moved this from 🪵Product backlog to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Feb 12, 2025
@tepi tepi moved this from 🟢Ready to Go to ⚒️ In progress in Vaadin Flow ongoing work (Vaadin 10+) Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hilla Issues related to Hilla
Projects
Status: ⚒️ In progress
Development

No branches or pull requests

2 participants