vapor / template-kit

📄 Easy-to-use foundation for building powerful templating languages in Swift.
MIT License
46 stars 17 forks source link

PlaintextRenderer does not conform to ViewRenderer #35

Closed vzsg closed 6 years ago

vzsg commented 6 years ago

...even though Vapor's default service configuration registers it as such, leading to crashes with a failed force cast.


(Why registering an unrelated type for a service is not a compile time error would probably be a separate issue for vapor/service.)

tanner0101 commented 6 years ago

Hmm.. On master it appears to conform to TemplateRenderer (https://github.com/vapor/template-kit/blob/master/Sources/TemplateKit/Pipeline/PlaintextRenderer.swift#L2) which in turn conforms to ViewRenderer (https://github.com/vapor/template-kit/blob/master/Sources/TemplateKit/Pipeline/TemplateRenderer.swift#L12). Am I missing something?

vzsg commented 6 years ago

No, you aren't. The commit that closed #17 also fixed the crash, I just forgot to update my toybox project before writing this 🤦‍♂️ ... Sorry.