DynamicSurroundings icon indicating copy to clipboard operation
DynamicSurroundings copied to clipboard

[1.16.5] mods.toml file has a syntax error

Open ephys opened this issue 5 years ago • 2 comments

Mod Version:

1.16.4-4.0.3.12.jar

Forge Version:

Not forge related

Link to client log:

N/A

Link to crash log:

N/A

Description:

I'm trying to build a tool that will warn me if a mod is missing a dependency before I launch the game to catch errors as early as possible, and I noticed that this mod's mods.toml failed to parse because it's using multiline strings with a basic string delimiter (which doesn't accept multiline)

See current mods.toml:

image

VS how it could be:

image

NB: This currently works in forge due to a bug in the TOML parser

ephys avatar Mar 08 '21 17:03 ephys

Where are you getting the text? This is the TOML file. The data in question is a single string enclosed by quotes. It does have "\n" impregnated within.

OreCruncher avatar Mar 08 '21 20:03 OreCruncher

Thanks for the link, I was looking for that file :)

I'm getting it straight from the Jar, I'm not sure why \n is getting transformed into a proper new line. I'm hoping it's not the expand instruction in processResources

I'll do some more research and get back to you

Edit: according to this it might be the case https://github.com/gradle/gradle/issues/10458 I'll test bundling the file without expand to see if that's the culprit

Edit: yep

Workaround seem to be to double escape \ or to use """ (or ''') as string delimiters that contain \n

ephys avatar Mar 08 '21 21:03 ephys