MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Code Analysis Failure on Forge Projects because of missing mapping data

Open Davoleo opened this issue 4 years ago • 7 comments

  • Minecraft Development for IntelliJ plugin version: 2019.3-1.3.4
  • IntelliJ version: 2019.3.1
  • Operating System (this has come up enough times to be important): Windows 10 1909
  • Target platforms: Forge

The title pretty much says it all, Code Analysis being stuck also partially breaks intelliSense making coding quite uncomfortable, it also breaks code coloring of the section of the file you change, it's like they don't get even checked because the inspection is stuck This behavior is the same on every file, and it doesn't depend on how long the file is

I managed to understand this plugin was what was causing the issue because after disabling it the inspection ran fine on every file

Davoleo avatar Feb 06 '20 18:02 Davoleo

This might be relevant to the issue, it's the error message I get while committing changes to the git repository image

Davoleo avatar Mar 28 '20 14:03 Davoleo

Tested on IntelliJ 2020.1 Plugin Version: 1.3.5 both on mappings "stable_39" and latest 1.12 snapshot Forge mod project: https://github.com/Davoleo/Metallurgy-4-Reforged image

Davoleo avatar Apr 10 '20 17:04 Davoleo

Has anyone looked into this issue yet? Is it at least reproducable with the information I've given you in my last comment? could anyone give me some feedback? >_>

Davoleo avatar May 10 '20 19:05 Davoleo

Hey sorry for not taking care of this issue for such a long time. I already saw this error multiple times, but that does not break anything from what I remember (I don't know how/where it can reproduce it easily though.)

I guess the simplest thing to do is never throw an exception and simply skip stuff (like inspections) that require mappings if that is the root of the problem. I haven't touched that much the mappings/forgegradle part of this plugin and I can't tell if this would break other things but I'll see if I can do something about it.

RedNesto avatar Jul 09 '20 10:07 RedNesto

the weird thing is that even if I disable Forge plugins inspections fromt he settings this still happens in some files

anyways, the result of failing inspections (at least in my project) is that the symbol at the top-right of the editor that shows the status of your file remains an eye icon and if you hover over it it says "no errors have been detected so far..." or something similar as if it was still analysing the file, the issue is it never finishes analysing it, and this is why this breaks all other inspections and makes code completion slower

weren't you able to reproduce this even cloning the repo I've linked before, were you?

Davoleo avatar Jul 09 '20 19:07 Davoleo

Yeah I clones your repo, set it up and opened some files that contain mapped symbols without any issue. I can can try harder when I can (was on 1.4.2 2020.2 EAP.)

I am a bit surprised it throws exception in the first place without people complaining for such a long time, it's the easy way to say "nope, not available" but if it breaks things I guess Demon or I will find a better way (it may be relatively easy to fix, haven't tried yet.)

RedNesto avatar Jul 09 '20 19:07 RedNesto

~can confirm this is happening for me too, with this plugin enabled code analyzing seems to fail and therefore miss newly created errors or show errors when said errors have already been resolved. as soon as I disabled the plugin code analyzing started working fine again. I am using ubuntu 20.04, using idea 2020.2, and plugin version 1.5.0~ Nevermind might be more an underlying idea issue

Trinsdar avatar Aug 03 '20 02:08 Trinsdar