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

Codechange: Reintroduce 0.4 syntax for compatibility #152

Merged
merged 3 commits into from May 25, 2020

Conversation

glx22
Copy link
Contributor

@glx22 glx22 commented May 24, 2020

This allows to compile FIRS master branch with many warnings.

Copy link
Contributor

@FLHerne FLHerne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea IMO, breaking compatibility makes life difficult for GRF authors.

I tried this on OpenGFX+ Industries and an older version of FIRS; compared to 0.4.5 the only changes in the generated NFO are that prop13 is used instead of 0A/B/C (with the same meaning in every case I looked at), and some Action2 changes in OGFX+ caused by #118.

nml/actions/action0properties.py Show resolved Hide resolved
nml/actions/action0properties.py Outdated Show resolved Hide resolved
nml/actions/action0.py Outdated Show resolved Hide resolved
Copy link
Contributor

@FLHerne FLHerne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One copy-paste error, otherwise LGTM.

I notice there are "2 shift/reduce conflicts" in the parser debug, but those are there before this patch.

nml/actions/action2var_variables.py Outdated Show resolved Hide resolved
@glx22 glx22 merged commit 1d67cce into OpenTTD:master May 25, 2020
@glx22 glx22 deleted the old_vars_props branch May 25, 2020 22:58
@andythenorth
Copy link
Contributor

Thanks. I guess this changes the precedent for future breaking changes. :)

@nielsmh
Copy link
Contributor

nielsmh commented May 26, 2020

The docs should change to "deprecated" yes, perhaps with a note that the syntax was entirely removed in a range of versions.

@glx22
Copy link
Contributor Author

glx22 commented May 26, 2020

I think the old syntax can stay as long as it's easy to support it. Anyway with all the warnings it outputs, it should be annoying enough to incite authors to switch.

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

Successfully merging this pull request may close these issues.

None yet

4 participants