MinecraftForge / AccessTransformers

Antlr4 definition for MCP / Forge Access Transformers
GNU Lesser General Public License v2.1
14 stars 12 forks source link

Suggestion: trim AT lines before parsing #9

Closed UpcraftLP closed 4 years ago

UpcraftLP commented 4 years ago

currently, having a leading space in an AT entry silently invalidates the entire file, leading to a cryptic error message like Could not find net.minecraftforge:forge:1.14.4-28.1.109_mapped_snapshot_20191225-1.14.3_at_2c066ae5bccf93f921adfce6242a13228141e4fb.

My suggestion is to simply call String#trim() before parsing AT lines, therefore allowing leading / trailing spaces.

LexManos commented 4 years ago

But that invalidates the existing AT file format. Better to just use the correct format when you're ASMing classes. As for the 'cryptic error' the real cause is elseware and should be printed to the log with --stacktrace enabled. If not then it's a issue on FG's end so wrong repo.