-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Incremental cache lost after a compilation error when using Micronaut #19453
Comments
|
@oehme I am not sure because when Micronaut is not implicated in the build, it seems working, but maybe the problem could also happening without Micronaut, in this case, yes it’s a duplicate |
Ah sorry I misread the steps. You're right, this is not a duplicate. I'll have a look what's going on in this scenario. |
@oehme thanks, I hope it gonna be fixed soon |
@oehme I am not sure but it seems that when I cancel the build before it finish it leads to the same problem I think |
Any update about this issue ?! |
This looks like an issue when compilation fails and we do a full recompilation after the failure. We plan to fix this, but due to other priorities it very likely won't be fixed in next two months. |
The linked PR #20950 probably fixes this issue. The reproducer doesn't work with any of latest Gradle (7.3.3 or 7.4.2) so I can't test it (wrapper has version 5.6.4). I think this is an issue with "full recompilation after the failure". So if no other reproducer is added that shows this is some different issue, this issue will be closed once #20950 gets merged. Of course you can always open a new issue. |
@asodja hi, this issue was opened 4months ago, you asked me to try with the last version, so I create a new issue with the last version, but now it’s not the last version anymore, but all you need to check if it fixed or not, is to change the version of gradle in the joined test project, otherwise each time I will create a new issue with the last version, then it had to wait to a new version then you will ask the same thing …. |
I understand that it's not feasible for you to update Gradle version for me and that totally makes sense. The problem I am facing is, that when I try to reproduce the issue with the version specified in this issue (7.3.3) and reproducer linked in the issue: https://github.com/gradle/gradle/files/7791258/micronaut-cache-conflict.zip I get:
I also tried with version 7.0 and got the same problem. This indicates that the plugin that is used in the reproducer is not updated to work with 7.x. So it seems to me that the reproducer was actually not run with Gradle 7.3.3. |
@asodja you are right, the project is misconfigured, my bad, you can close the issue, I will reopen it, if I found the time to fix it. |
Thanks for rechecking it. |
The cache is lost after any compilation error when Micronaut-inject is shipped with the project, so for example :
1- Build this project a first time
2- Make a build error, for example by removing any parentheses on the line 12 (
log.debug
) of thetest.Application
class in the/grails-app/init
folder, please note that Micronaut injection must be triggered in the code, that's why I added the first lineTriggerMicronaut.getDeclaredField("name")
by calling reflection API3- Build the project, so the build will fails
4- Correct the code, to succeed the next compilation
5- Rebuild the project, here, instead of having an incremental build (just one file), we got the message :
I am using Gradle 7.3.3 ( latest version ), with open JDK 16
micronaut-cache-conflict.zip
The text was updated successfully, but these errors were encountered: