Skip to content

Headers should support deep equality #143

Closed

Description

@nielsenko

Describe the bug

While working on #95 it became apparent that not all headers implement implement operator== and hashCode correctly.

All header values are designed to be immutable value types, which (at least to me) also implies that you should be able to compare two different instances x, y (!identical(x, y)) but logically equal instances for deep equality.

Many header classes already implement this correctly, but not all. We need to add tests to expose this, and fix any header classes not compliant.

To reproduce

VaryHeader.wildcard() != VaryHeader.wildcard();

is just one example

Expected behavior

Logically equal headers should be equal as per operator== and hashCode.

Library version

relic: 0.5.0 (and prior)

Platform information

any

Additional context

No response

How experienced are you with this library?

None

Are you interested in working on a PR for this?

  • I want to work on this

Activity

  1. added
    bug
    on Sep 3, 2025
  2. self-assigned this
    on Sep 3, 2025
  3. changed the title [-]bug: Headers should support deep equality[/-] [+]Headers should support deep equality[/+] on Sep 4, 2025
  4. moved this from Inbox 📫 to In Progress 🔥 in Serverpod Frameworkson Sep 4, 2025
  5. moved this from In Progress 🔥 to Done 🚀 in Serverpod Frameworkson Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions