-
Notifications
You must be signed in to change notification settings - Fork 1
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
Updates so everything compiles with GraalVM #1
base: main
Are you sure you want to change the base?
Conversation
Just for reference the upstream issue jhipster/generator-jhipster#22488. Regarding h2 + native, I remember we had a similar problem with the native blueprint too, but I am not sure anymore how we fixed it (or just switched to psql for everything). When using native support for 2.x we needed to switch to tomcat as undertow was not compatible at that time, but I guess that is fixed. |
While there are quite a few conditions attached, I managed to start it "for the time being". Here are the changes I've made. I'll write down how I avoided errors up to the launch.
The operation is extremely unstable. Sometimes http://localhost:8080/ succeeds and sometimes fails. Via http://localhost:4200/ with I'll continue to investigate this issue. |
Good News! With boot 3 you can define the needed meta data in code instead of json files. |
I have made some progress since the previous stage. Here are the changes I've made.
Here are the fixes I made:
Also, I apologize, some parts of my previous comment were incorrect and redundant (I will correct these with a strike-through line in my previous comment).
Additionally, I was considering using I hope this helps, even if it's just a little. |
In the dev environment, I've managed to get the app running with a minimum metadata. The number of definitions in the metadata is less than 30. All tests pass with 'npm run e2e'. Here are the changes I've made from the beginning. Ultimately, I couldn't figure out how to reduce the numerous metadata, so I decided to start from scratch, and from there, went through a process of trial and error, diligently eliminating errors one by one. I'm currently working on prod (mysql), but progress has been slow. |
There are challenges, but I have managed to get the CRUD operations for Blog/Post/Tag working in the GraalVM's native environment with the following configurations:
Here are the changes I've made. The implemented solutions are as follows:
Issues 3 and 4 occur due to the I've spent a month analyzing issue 4 but to no avail. Specifically, I can't retrieve Post.getTags(). Even if I consciously try to fetch it Eagerly, the PersistentSet doesn't materialize. It currently looks like this: With the use of Hibernate.initialize(), it barely looks like this:
... This is the situation, but it somewhat works as it is. |
@hide212131 Thanks for all your work on this! I think the coolest solution would be to integrate native support into the main generator by default. The only issue with this is that start.spring.io doesn't integrate native by default. You have to add it as a dependency. If you select Spring Data JPA on start.spring.io, it also adds the hibernate-enhance-maven-plugin. Because of this, I could see putting everything in a blueprint too. Or, we could add an additional question to the generator asking if the user wants to add GraalVM support. Then we could make changes accordingly. I believe this might also be useful for the Micronaut and Quarkus generators. I'm curious to hear what others think. @mshima, @DanielFran, @atomfrede, @deepu105 |
I think we should keep as a blueprint for now. |
@mshima You make an excellent point about CI. @hide212131 Are you willing and able to make these changes in the https://github.com/jhipster/generator-jhipster-native blueprint? |
I'm also in favour of Blueprint as the repo is too big now. |
I would also go with a blueprint. I guess there is not much a central approach can provide when it comes to supporting native in e.g. micronaut or quarkus blueprint. From what I have seen, it is mostly configuration each blueprint needs to handle anyways. |
No description provided.