Tracing context properties not found.

Issue #4 new
Tiago Ribeiro created an issue

Hi, is it possible to add properties not found tracing?

I'm using stipple for localization, generating pre-compiled localized html files, it would be great if at compile time it would warn me if a context property is not found.

For example:

<html><head><title>{{{locals.title}}}</title></head></html>

would trace property locals.title not found to the console if its not set, that would be great for quality control.

Thank you, even tho this lib its still in beta I'm using in production already with success.

Cheers,

Comments (2)

  1. Niel Drummond repo owner

    Stipple used to have this feature, but I took it out because it ended up being less robust than I would have liked, and raising some difficult implementation questions.

    https://bitbucket.org/grumpytoad/stipple/src/9e4d1181d77f910c13a8bcc3af7fe1c633076399/stipple/TypeChecker.hx

    I can re-add the code in a branch and add a special function to activate this. Maybe you can try it, it was working fine for some simple examples. Some of the open issues were:

    • not all of the haxe AST was handled, so I wasn't sure if all combinations of inheritance and interfaces were being dealt with.
    • helpers were difficult to detect, because they can be declared in many different ways.
    • it's quite easy in haxe to leave something as lazily typed, or dynamically typed, and this made the type checker confusing (is it checking this nested helper block or not ? e.g. #each wasn't working because it's a dynamic lookup).
    • the positional argument was flaky.
  2. Log in to comment