Skip to content

Formatting Cyclic Types produces infinite output #830

@meln5674

Description

@meln5674

When using gomega (and, by extension, ginkgo) with cyclic types, the output from formatting the objects from e.g. Expect(foo).To(Equal(bar)) is infinite, and if the cyclic pointer field is early in the struct, the actual differing fields may never actually be printed. This renders this output nearly useless.

I would like to propose and implement adding a new struct tag gomega:"omit" which replaces the formatting output of that field with a message indicating it was omitted, plus the address if it was a pointer. This would allow cyclic types to be formatted finitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions