SpacemanDMM
SpacemanDMM copied to clipboard
environment parser fails silently on consts that conflict with builtins
For 515 forward compatibility, I have had these five consts declared in a block of #if DM_VERSION < 515
in _version.dm#L66.
I also added these to suite's builtins.rs in https://github.com/SpaceManiac/SpacemanDMM/pull/354.
From releases incorporating that PR, the parser chokes on the consts in the linked _version.dm and fails silently, emitting only a stock stddef'y json of the environment.
Replacing the consts with defines resolves the choke.
I believe the issue amounts to suite being basically a rolling release - things like builtins are only versioned in comments, and so it's possible to encounter situations that on the latest byond version would be a legitimate fail, but on earlier ones would not.
It would probably be a fairly significant amount of work to break up things by byond version and add a config option for a target version, and I'm no good with rust, so I'm not sure where to go with this besides saying that it's a thing.
Silently? I get a predictable error:
meme.dme, line 1, column 19:
error: got '1', expected one of: identifier, '/', '[', contents, newline
- fatal error: the parser cannot continue
- constant evaluation will be skipped