Open liach opened 4 years ago
Absolutely. This would need support throughout the toolchain though. Why not use checker for what we add in the naming tools, and remap what Minecraft has to checker?
We can remap some minecraft jsr elements to checker. additionally, we may need ways to remove improper minecraft annotations as well (e.g. nullable on client player field should be changed to conditional null check annotations)
Conditional null check annotations?
I disagree. Decompiled yarn code should match the vanilla code. Changes like removing @Nullable
, changing access levels, etc. should be done separately by Fabric API,
Fyi currently enigma itself handles changing access levels. We can store this information in yarn (as a metadata on obfuscated minecraft), but allow the annotation info to be applied selectively (i.e. currently when we use yarn, we convert enigma to tiny and use tiny; the anno info will not be in tiny (enigma only, or stored in separate data structure); and the info will be left for loom to process)
Currently, the minecraft code fabric mod depends on has a few jsr305 annotations. However, these annotations are often not clear enough, such as
@Nullable
on the client controlled player field in the client instance (which is guaranteed to be never null if the client is executing in a game renderer, etc.).As a result, we should probably add annotation attachment ability to enigma (preferably java 8 type annotations) and produce annotated jars for modding. Thoughts?