Requirements warn if loading components as tools #77144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
Describe the solution
Specifically check requirements data during finalizing data and consistency checking to see if we're missing any valid possibilities. If there's literally nothing then it will never work.
Unfortunately, there is no way to be more specific with our error messages than giving the requirements set ID.
Describe alternatives you've considered
I would love to throw errors earlier and more fatally, during loading. But we don't know at that time if the requirements are actually valid or not. Expanding the requirements doesn't happen until inline_requirements, after all requirements have been loaded. At that point we've already lost where we were in json and there's no better information to provide, so we just have to give what we can.
Testing
shot_forming group properly throws errors with C++ changes applied
00 shot, reloaded can be crafted with json changes applied
Additional context
With this, I don't actually understand how #72801 worked or why it doesn't work here. It caught at least some of these errors in the past, but why not this one?