-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Rewrite yaml merger #10648
Rewrite yaml merger #10648
Conversation
var a = MiniYaml.FromString(mixedMergeA, "mixedMergeA"); | ||
var b = MiniYaml.FromString(mixedMergeB, "mixedMergeB"); | ||
|
||
// Merge order should not matter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this test because it was bogus (merge order does matter).
fd62380
to
acf7737
Compare
|
b986ef9
to
afa5ed6
Compare
Found the issue, wrote a unit test for it, then fixed it. |
afa5ed6
to
f8f3d1d
Compare
#8086 seems to be fixed. #8185 is not fixed. ^DefaultDeathVoices:
Voices:
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman7,dedman8
Burned: dedman10
Zapped: dedman6
DisableVariants: Die, Burned, Zapped
GenericVoice:
Inherits: ^DefaultDeathVoices
Variants:
allies: .v01,.v03
england: .v01,.v03
france: .v01,.v03
germany: .v01,.v03
soviet: .r01,.r03
russia: .r01,.r03
ukraine: .r01,.r03
Voices:
Select: await1,ready,report1,yessir1
Action: ackno,affirm1,noprob,overout,ritaway,roger,ugotit I got
edit: Ignore the partially wrong indentation, the .yaml has correct indentation. |
@reaperrr: did you try that before or after my latest fixup? The issue with Edit: Just tested myself, and confirmed that voice inheritance does indeed work. Updated the fixes list at the top to reflect this. |
Before, works now. |
Tested weapon and sequence inheritance, encountered no issues. The code is out of my league, but the way it works in practice gets my 👍 |
Looks fine to me. The only inconsistency I could find was this: rules/aircraft.yaml:
in map.yaml:
doesn't throw an error for the double removal.
does throw an error. I guess that's because of this call to |
Correct. Merging all keys with the same identifier together is fundamental to the way our rules are set up. I don't think there's any reason to handle removals differently. |
Fixes #10207
Fixes #7556
Fixes #8890
Fixes #8086
Fixes #8185
As I explained in #10207 all these bugs exist because the code tried to treat yaml merging and inheritance as separable steps (which is completely bogus). This moves the inheritance logic into the yaml parser and fixes the merge and removal logic to behave in the logical way.