hilla icon indicating copy to clipboard operation
hilla copied to clipboard

V15 Endpoint / entity generation should happen during build time in dev mode

Open stefanuebe opened this issue 4 years ago • 0 comments

In the actual version of V15, when in development mode, endpoints and related entities are generated only when the application starts up / during runtime. This behavior is un-intuitive and unexpected, since most tool chains, like for instance Lombok, create generated sources during build / compilation time, so that these can be used immediately for code development (e.g. for code completion or to prevent compilation errors).

Forcing the user to start the application when it's maybe still in a state of not being ready for a run (for instance during migration or early development phases) might lead to unnecessary frustration or irritation.

Request is, that small lightweight operations, that occur more often during the development of an application, but do not have such a huge impact on the performance should not need the application run (thus should not be part in the build-frontend goal).

To be more concrete with this issue the tequest is, that it should be possible to generate endpoints and entities during compilation time.

Potential ways of solving that could be:

  1. extend prepare-frontend to automatically do that, too
  2. create a new goal for the maven plugin (e.g. generate-frontend-sources), that could be triggered during maven's generate-source lifecycle phase
  3. make the maven plugin optionally configurable, which parts of the build-frontend actions should happen during the prepare-frontend step (not sure if that is really helpful or useful in the end, just some blurry idea)

I'd say the 2nd option makes the most sense.

See the internal Slack discussion for more context.

stefanuebe avatar Apr 09 '20 08:04 stefanuebe