Skip to content

Conversation

@leoafarias
Copy link
Collaborator

Summary

Add proper ==() and hashCode implementations to all AckSchema and Constraint classes. Schemas were marked @immutable but relied on identity equality, breaking their use as Map keys and in Sets. This also fixes UniqueItemsConstraint, which depends on value equality for detecting duplicate objects in lists.

Changes

  • Implement equality in 12 concrete schema classes and base class helpers
  • Implement equality in 9 constraint classes and validators
  • Add 62 comprehensive tests for equality semantics across all types

Testing

All 905 existing tests pass plus 62 new equality tests covering schemas as Map keys/Set members and copyWith() preserving equality.

…ints

Add proper ==() and hashCode implementations to all AckSchema classes and
Constraint classes. This enables schemas to work correctly as Map keys,
in Sets, and fixes UniqueItemsConstraint for detecting duplicate objects.
All schemas are @immutable but were using identity equality; now they use
value-based equality matching their configuration. Includes comprehensive
test coverage for equality semantics across all schema and constraint types.
@docs-page
Copy link

docs-page bot commented Jan 14, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/btwld/ack~62

Documentation is deployed and generated using docs.page.

@leoafarias
Copy link
Collaborator Author

Superseded by PR from properly named branch

@leoafarias leoafarias closed this Jan 14, 2026
@leoafarias leoafarias deleted the leoafarias/pull-main branch January 14, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants