Skip to content

"Invalid type for dependent function" does not have any context #240

@misha-ridge

Description

@misha-ridge

If an invalid kind of dependency is passed into mg.Deps, then it's pretty hard to nail down what has happened, as the error message does not provide any location where that happened:

Error: Invalid type for dependent function: func(string, string). Dependencies must be func(), func() error, func(context.Context), func(context.Context) error, or the same method on an mg.Namespace.

It would be nice to be able to point to at least mg.Deps invocation, or, better, to the argument that caused the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions