-
Notifications
You must be signed in to change notification settings - Fork 9
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
Could not generate unknown file: Attempt to recreate a file for type #77
Comments
I found that Intellij was using Gradle 6.8 whereas |
Okay, this still happens despite the fact that I'm now very sure that I use the same version. |
I have seen this occasionally happening, cleaning that project fixes it for me, but I don't know how to properly fix this. Does it happen every time? Maybe it could be fixed by adding a Gradle task that cleans the generated files before compilation. |
It seems to occur when I mix building Spoofax 3 from the command line and from Intellij, even if the versions of Gradle match and the gradle tasks to be executed are the same. I've now resorted to just using Intellij, which seems to avoid the problem mostly, and executing |
metaborg/pie@6ee1c79 should fix it, the issue was that the generated sources were indeed passed as a source path. Fixed by generating the PIE Java sources into a different directory. |
Summary
After the initial compilation, recompilation of Spoofax 3 fails with a hundred of these errors:
It also makes the build extremely slow.
What you did
Invoke the build:
What you expected to happen
The build should succeed.
What actually happened
The build fails with a hundred of these errors.
Context
Additional information
Apparently this issue sometimes pops up with Dagger, see here and here. Supposedly with Maven (but also Gradle), in both Intellij and Eclipse:
I suspect there is a problem where something is already generated before the Dagger annotation processor starts to work.
Therefore, a workaround could be to delete the generated files before building. The following command in the
pie
project deletes all untracked and ignored files and directories, and seems to help:Full Gradle output:
The text was updated successfully, but these errors were encountered: