-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Regression in 1.7: Dev mode auto-compile fails in MapStruct with "Attempt to recreate a file for type ..." #11253
Comments
@michalszynkiewicz Could it be caused by the new prepare execution? |
@famod I don't think it's likely. |
@michalszynkiewicz Well... The problem vanishes once I switch this to The number of sources being compiled is then also much lower than with the auto-prepare. |
Btw, explicit |
@aloubyansky Do you have a clue what's going on? |
Not yet. One thing with code get is that it does not seem to take into account the launch mode. But it's unlikely the cause here. |
So the workaround for now is I don't really understand why this new goal is kicked off by default. Shouldn't there be an opt-in instead? PS:
Well, no relevant difference AFAICS. |
Thanknyou for investigating it @famod! Do you happen to have some small reproducer? |
No, unfortunately I don't. I am not allowed to share the affected project so I'd need to create a reproducer from scratch, |
If I have time, I'll try to create a reproducer. But I don't know mapstruct, also have other important stuff and start PTO next week ;) Anyway, good to know that it's the prepare goal that causes the problem. |
I have a reproducer ready locally. Will push it to GH later today or tomorrow. |
Reproducer is up! See updated issue description. Edit: Added a missing step (cd getting-started). |
@aloubyansky @michalszynkiewicz I let you have a look at the reproducer? |
FWIW, I am almost certain that the problem is caused by
My theory is that then At this point I'd (again) strongly suggest to also bypass auto-code-gen in DevMojo in case it makes no sense to invoke it in the first place (e.g. when there are no .proto files). |
@famod if you run with quarkus/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java Lines 271 to 273 in 1d754b2
|
Perhaps one solution would be to run |
This ensures that the generated sources are always cleaned up if the compile plugin needs to be invoked Fixes quarkusio#11253
I opened #11311 which seems to fix the issue, let me know if there is a case where this wouldn't work |
Hi, I am facing the same issue in quarkus 2.3.0.FInal and also 2.2.3.Final |
@arunkjn please open a new issue and describe your issue in detail. A reproducer will help a lot. Thanks! |
Describe the bug
I am getting this strange error during auto-compile while trying to start dev mode in one of our modules:
I have no clue why this is so horribly garbled.
mvn -e ...
doesn't help much but at least reveals which type was attempted to recreate.This is not flaky, btw. Only the affected "MapperImpl" can fluctuate (we have multiple mappers).
Dev mode in another module does work, but there we do not use MapStruct.
The very same code works with 1.6.1.Final!
Expected behavior
Should just compile (if needed) without errors.
Actual behavior
Build is aborted.
To Reproduce
Steps to reproduce the behavior:
Note: This reproducer uses MapStruct 1.4.0.Beta3. Downgrading to 1.3.1.Final does not change anything.
Configuration
n/a
Environment (please complete the following information):
uname -a
orver
:MINGW64_NT-10.0-18363 XXX 3.0.7-338.x86_64 2019-11-21 23:07 UTC x86_64 Msys
java -version
:OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
mvnw --version
orgradlew --version
): Apache Maven 3.6.3Additional context
mvn clean compile quarkus:dev
works, which is no wonder since compile is skipped in this case.I found two commits that may have something to do with it (the first one being the "hottest" candidate):
I did not yet have the time to debug this.
The text was updated successfully, but these errors were encountered: