Skip to content

Fix <dispatcher> substitution for events: dogma.EventRecorder no longer exists #464

@jmalloc

Description

@jmalloc

In internal/inflect/inflect.go, the <dispatcher> placeholder for message.EventKind is substituted with dogma.EventRecorder:

message.EventKind: {
    // ...
    "<dispatcher>": "dogma.EventRecorder",
},

dogma.EventRecorder was removed in a prior release (see CHANGELOG). This means error messages and suggestions that use <dispatcher> in an event context — such as the hint in expectation.messagecommon.go:

s.AppendListItem(inflect.Sprint(t.kind, "verify the logic within the code that uses the <dispatcher>"))

…will render stale/incorrect interface names to the user.

The substitution should be updated to reflect the current Dogma API. The test files expectation.message.eventcall_test.go and expectation.messagetype.eventcall_test.go also hardcode dogma.EventRecorder in expected output and will need updating.

Also, action.call.go references dogma.EventRecorder in a doc comment (lines 13 and 21) and should be corrected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions