Skip to content

'simple' resolvers should somehow warn in mustachio if a parent node resolves for them #2667

Closed
@jcollins-g

Description

@jcollins-g

Somehow, it would be nice if a simple resolver would warn if it could have resolved something if it was part of the visibleTypes, but failed to do so. An example case that made me scratch my head for an hour or two was:

<li>{{{linkedName}}}</li>

I had erroneously thought my refactor in #2665 meant I could delete DefinedElementType from the visibleTypes list. When I did so and mustachio went to resolve linkedName here, it skipped over the DefinedElementType inside publicSuperChainReversed and instead resolved linkedName against the class. This meant that the class's name repeated in the superchain list.

This was particularly troublesome to debug as unless someone was actually looking at the generated HTML there was no way to know, and everything looked correct in the debugger, the superchain list objects were correct, and so forth. In fact, if it wasn't for that I remembered I had removed that and noticed that the superchain was a collection of DefinedElementTypes I might still be scratching my head.

I am not sure how to make this warning happen without making simple resolvers much less simple...

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ontype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions