Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment parser fails silently on consts that conflict with builtins #373

Open
Spookerton opened this issue Oct 12, 2023 · 1 comment

Comments

@Spookerton
Copy link
Contributor

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 #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.

@Spookerton Spookerton changed the title parser fails silently on consts that conflict with builtins environment parser fails silently on consts that conflict with builtins Oct 12, 2023
@SpaceManiac
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants