You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #156, the project migrated from gopkg.in/yaml.v2 to yaml.v3. None of the tests detected a failure, but the unmarshaling of normalizations.yaml was broken. The test below detects the change.
This change addresses #169 to fix bugs introduced during the upgrade from yaml.v2 to yaml.v3.
Add failing test case: A test case has been added to highlight the regression.
Update yaml.v3 Unmarshaler implementation: The yaml.Unmarshaler interface changed between yaml.v2 and yaml.v3, but the implementation was not updated accordingly. This commit ensures that the yaml.Unmarshaler interface is correctly implemented and adds compile-time checks to ensure proper interface adherence.
Flatten keys in normalizations.yaml to avoid deep merge issues: Under yaml.v3, anchors with objects do not perform a deep merge as expected in previous versions. To address this, the structure in normalizations.yaml has been flattened, replacing the object-based merging with a flatter structure. This ensures the expected behavior where keys in later nodes override keys from earlier ones. The flattening of normalizations.yaml was aided by https://gist.github.com/andrewkroh/e7212a1ff033a0227f7c8d3fa7df8973 (white space changes were manually reverted).
Enable strict YAML decoding: This change enforces strict decoding of normalizations.yaml to ensure all fields are explicitly defined in the corresponding struct. This helps catch potential typos or undefined fields.
In #156, the project migrated from gopkg.in/yaml.v2 to yaml.v3. None of the tests detected a failure, but the unmarshaling of normalizations.yaml was broken. The test below detects the change.
The reason appears to be twofold:
Unmarshaler
interface signature changed. https://pkg.go.dev/gopkg.in/yaml.v3#UnmarshalerThe text was updated successfully, but these errors were encountered: