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

"Urgent" IDD fix for min-fields on new Plugin Instance object #7812

Merged
merged 2 commits into from
Feb 27, 2020

Conversation

Myoldmopar
Copy link
Member

Pull request overview

Min fields is 5, but there are only 4 fields. IDF-Editor complains when trying to open any IDF based on this version. This must go in.

@mbadams5 is there a spot to hook in a check for this when generating the schema? I can make a standalone test, but if I could just have the schema generator fail if it finds this condition, that would be great.

@mbadams5
Copy link
Contributor

@Myoldmopar Maybe, I'll have to look through the code to see if there is a good spot or not.

@Myoldmopar
Copy link
Member Author

@mbadams5 I think I found a good spot, and added in a check for min-fields > number of fields. I had to protect against extensible objects, but it seems to work well. If you run it as-is, it passes, but if you go into the IDD and put the plugin object back to min-fields 5, it throws a runtime error when trying to generate the schema. Runtime errors are what are thrown in other sections of that idd parser, so I figured that was suitable. Let me know if you like these changes. And if you do, feel free to merge this if you want.

@mitchute
Copy link
Collaborator

I verified the fix and test. Calling generate_epJSON_schema.py now fails when \min-fields is greater than num_fields_with_name.

@mbadams5 any final thoughts on this before it merges?

@mbadams5
Copy link
Contributor

@mitchute I looked over it earlier this morning, but before CI results came back so I didn't merge then. It looks good to me.

@mitchute mitchute added DoNotPublish Includes changes that shouldn't be reported in the changelog IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Feb 27, 2020
@mitchute
Copy link
Collaborator

The only real warning is Github asking to add labels to the PR. That is done and this looks good. Merging.

@mitchute mitchute merged commit ca68d45 into develop Feb 27, 2020
@Myoldmopar Myoldmopar deleted the PluginInstanceIDDFix branch March 3, 2020 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DoNotPublish Includes changes that shouldn't be reported in the changelog IDDChange Code changes impact the IDD file (cannot be merged after IO freeze)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants