Closed Icosider closed 5 months ago
There is no issues here. You have to import the project twice for decompiled sources to show up. And it will use the project directory when you're using access transformers. These are intended behaviors.
What is the point of this logic? Why does it work this way and not all at once? Why is there no information about this in Forge_Docs?
It works this way because intellij/gradle requests the sources after requesting the binaries. It works this way because it is faster for CI builds, or any build that doesn't need the source as decompiling takes a long time. It'll be opt-in in FG7, but I havent cared to make it opt-in in FG3-6 if you wanna change that feel free to submit a PR.
And so, I imported the project into Intellij idea. The first time sync worked, everything is as it should be. Then close daemon forcibly and closed Intellij Idea. I reopened and imported the project and did the synchronization, but it still doesn't work, as you said.
There is no need to force kill anything. And if its not working as expected then you need to provide more information on what you're doing, given your project, and what you expect to happen. As it works fine for hundreds of thousands of others.
Good. From what I did, I took the usual forge 1.19.2 (I know that it is not supported, but the FG version is the latest for many MC versions). Then im "open" in intellij idea, click on "Sync" button and wait for loading. When loading was finished, I closed the project and, just in case, completely Intellij Idea. I started Intellij Idea again, started "Sync", waited for the download and... Nothing happened. the sources jar did not appear. Not in user/.gradle and not in projectFolder/build. If you do not close the project and immediately re-Sync, then this will not work. I didn't do genIntellijRuns.
After click on "Sync" button:
Upd: Found here in the console: "Cannot resolve resource filtering of MatchingCopyAction. IDEA may fail to build project. Consider using delegated build (enabled by default)."
Thats my workspace after 'Open' -> Select Directory -> As gradle project -> wait -> Resync
When i click "Sync", then i get this log:
Yes that means nothing. Try using it without intellij. Use the normal command line.
Hrm, it's work for console, but not for intellij idea
So, i have new progress in my problem. I remove a build and .gradle from test project. And i click to: On "unlink gradle project", then click to "Sync" and it's work for Idea.
I assume that in the new versions of Intellij Idea there is a certain cache of Gradle projects that saves the state and does not call the task for decompilation when resync occurs.
Perhaps I should identify the reason for this behavior directly in the ForgeGradle code and try to fix it.
@LexManos, any suggestions?
Please use the Discord for support. Issue reports are for final, confirmed problems.
Ya use discord and maybe someone who actually uses intellij for their daily driver will help you. I dont I just use it for testing basic things making sure they work. Worst case just use the command line to setup your project then import them as normal.
Steps to reproducing:
Necessary conditions: Your .gradle folder in user(example C:\Users\ur_user_name.gradle) must be removed or completely cleaned!
Then you will get the following list of files at the output:
In path: C:\Users\ur_user_name.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.19.2-43.3.7_mapped_official_1.19.2
Must be:
It was also sometimes noticed that the ForgeGradle added the fg_cache folder to the build folder of your project.
I rechecked this error on 3 different computers and everywhere there was a similar result.