You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[aot repositories] improve generation of aot metadata #1550
At the moment, the mechanism just reads the aot repository metadata file when it is around, but we don't have any support to actually get the metadata file generated. It is automatically generated as a side product of running the build of the project in aot-mode, but we can/should probably provide an easier way to achieve this from within the IDE - and also probably when changing source files of the project, so that those information gets updated quickly.
Work to be tracked here: #1713
(Started with some cleanup and polishing)
Next would be a cache of metadata by project. Cache entries invalidated when metadata json file added/removed/changed (maybe project added/removed as well?)
Idea for further work is use maven/gradle cli command to re-gen aot metadata. Likely the project does not even have to have the plugin in the pom or build.gradle file as plugin could be specified in the cli command. If this is the case perhaps for spring-data 4.x projects the codelens over queries might have some kind of generate/refresh action...
Unfortunately if I execute the mvn cli command on the Boot LS side there is no event coming from the changed json file. In order to get the event the file needs to be refreshed in the eclipse workspace which implies that it is best to run the maven command on the client via Eclipse m2e launch infra for Eclipse and via the command in VSCode.
(@martinlippert what do you think about all this? If you see me going off the rails please stop me ;-))
Next would be a cache of metadata by project. Cache entries invalidated when metadata json file added/removed/changed (maybe project added/removed as well?)
Caching could be done last, I would say.
Idea for further work is use maven/gradle cli command to re-gen aot metadata. Likely the project does not even have to have the plugin in the pom or build.gradle file as plugin could be specified in the cli command. If this is the case perhaps for spring-data 4.x projects the codelens over queries might have some kind of generate/refresh action...
Having a "refresh" action code lens aside the code lens that shows the generated query would be nice.
If there is no metadata file around yet, that code lens could also show up with "show aot-generated query" that then triggers the generation of the metadata file. All of that only if the project has the appropriate version of the Spring Data libs on the classpath, of course... :-)
Unfortunately if I execute the mvn cli command on the Boot LS side there is no event coming from the changed json file. In order to get the event the file needs to be refreshed in the eclipse workspace which implies that it is best to run the maven command on the client via Eclipse m2e launch infra for Eclipse and via the command in VSCode. (@martinlippert what do you think about all this? If you see me going off the rails please stop me ;-))
It feels right to me to execute the build actions to generate the metadata file via the client that usually also deals with the build environment, whether it is m2e or buildship, or whatever. So executing the command on the client side makes sense to me. That way, if things go wrong, users would probably have the chance to see the log output of the command as well - which will make debugging this easier if things go wrong on users machines.
Activity
BoykoAlex commentedon Nov 11, 2025
Work to be tracked here: #1713
(Started with some cleanup and polishing)
Next would be a cache of metadata by project. Cache entries invalidated when metadata json file added/removed/changed (maybe project added/removed as well?)
Idea for further work is use maven/gradle cli command to re-gen aot metadata. Likely the project does not even have to have the plugin in the pom or build.gradle file as plugin could be specified in the cli command. If this is the case perhaps for spring-data 4.x projects the codelens over queries might have some kind of generate/refresh action...
BoykoAlex commentedon Nov 13, 2025
Unfortunately if I execute the mvn cli command on the Boot LS side there is no event coming from the changed json file. In order to get the event the file needs to be refreshed in the eclipse workspace which implies that it is best to run the maven command on the client via Eclipse m2e launch infra for Eclipse and via the command in VSCode.
(@martinlippert what do you think about all this? If you see me going off the rails please stop me ;-))
martinlippert commentedon Nov 13, 2025
Caching could be done last, I would say.
Having a "refresh" action code lens aside the code lens that shows the generated query would be nice.
If there is no metadata file around yet, that code lens could also show up with "show aot-generated query" that then triggers the generation of the metadata file. All of that only if the project has the appropriate version of the Spring Data libs on the classpath, of course... :-)
It feels right to me to execute the build actions to generate the metadata file via the client that usually also deals with the build environment, whether it is m2e or buildship, or whatever. So executing the command on the client side makes sense to me. That way, if things go wrong, users would probably have the chance to see the log output of the command as well - which will make debugging this easier if things go wrong on users machines.
BoykoAlex commentedon Nov 14, 2025
Commands for executing maven goals are in. Needs this for VSCode: microsoft/vscode-maven#1108
If this all looks good we may even look at Gradle.
BoykoAlex commentedon Nov 25, 2025
I have extracted the Gradle case of "Refresh AOT Metadata" into #1722.
The rest is resolved via:
maven.goal.customcommand microsoft/vscode-maven#1108