Dynamic Surroundings

Dynamic Surroundings

51M Downloads

[1.16.5] mods.toml file has a syntax error

ephys opened this issue ยท 2 comments

commented

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

commented

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.

commented

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 gradle/gradle#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