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

Use id instead of ident for identifier member names in JSON #39332

Merged
merged 2 commits into from
Jul 31, 2020

Conversation

ZhilkinSerg
Copy link
Contributor

@ZhilkinSerg ZhilkinSerg commented Apr 7, 2020

Summary

SUMMARY: None

Purpose of change

Fix inconsistencies in identifier member names in JSON.

Describe the solution

Use id instead of ident for identifier member names in JSON while keeping temporary support for legacy ident member name.

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Organization General development organization issues [C++] Changes (can be) made in C++. Previously named `Code` labels Apr 7, 2020
@kevingranade
Copy link
Member

I'm fine with fixing this inconsistency, but we need to accept ident for these for a little while at least to give mods the chance to catch up, shouldn't be too hard?

@ZhilkinSerg
Copy link
Contributor Author

I'm fine with fixing this inconsistency, but we need to accept ident for these for a little while at least to give mods the chance to catch up, shouldn't be too hard?

Yeah, it is pretty easy. Both ident and id would be supported now. I've left FIXME comments near places of ident usage. Shall we add some user/log output too when we find ident instead of id?

@jbytheway
Copy link
Contributor

Yeah, it is pretty easy. Both ident and id would be supported now. I've left FIXME comments near places of ident usage.

Suggest it be TEMPORARY until 0.G rather than FIXME.

Shall we add some user/log output too when we find ident instead of id?

Seems like a good idea. Would probably have to be a debugmsg if you want anyone to notice.

(I'm starting to wonder whether we need to have a global option for mod developers to turn on more warnings that regular players shouldn't be concerned with).

@ZhilkinSerg
Copy link
Contributor Author

Temporary closing this one. I will need to change some other things in generic_factory first.

@ZhilkinSerg ZhilkinSerg closed this Apr 8, 2020
@ZhilkinSerg ZhilkinSerg reopened this Apr 11, 2020
@ZhilkinSerg ZhilkinSerg marked this pull request as draft April 11, 2020 09:26
@ZhilkinSerg ZhilkinSerg added the stale Closed for lack of activity, but still valid. label Apr 30, 2020
@ZhilkinSerg ZhilkinSerg reopened this Jul 28, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Jul 28, 2020
@ZhilkinSerg ZhilkinSerg force-pushed the idents-ids branch 3 times, most recently from 6d8bc9e to 09c9c57 Compare July 28, 2020 21:56
@ZhilkinSerg ZhilkinSerg changed the title Replace ident with id in all jsons, except in modinfo.json Use id instead of ident for identifier member names in JSON Jul 28, 2020
@ZhilkinSerg ZhilkinSerg marked this pull request as ready for review July 28, 2020 22:13
@kevingranade
Copy link
Member

Test failure.

+'[' -n 1 ']'
+blacklist=build-scripts/mod_test_blacklist
++./build-scripts/get_all_mods.py build-scripts/mod_test_blacklist
Traceback (most recent call last):
  File "./build-scripts/get_all_mods.py", line 29, in <module>
    ident = e["ident"]
KeyError: 'ident'
+mods=

@ZhilkinSerg
Copy link
Contributor Author

Should be fixed now.

Leave temporary support for `ident`. Marked with:

// TEMPORARY until 0.G: Remove "ident" support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Organization General development organization issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants