Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As discussed in review, it’s highly unlikely this is actually needed anymore! Brief backstory context in case we ever have reason to doubt this: 0. The WHO VA form, which I’ve used as a frame of reference for many things, uses two references to `null` that don’t resolve to anything. The inferred intent is to treat `null` as a keyword, just as it would be in languages with the Billion Dollar Mistake. 1. In early prototyping (pre Web Forms project), the WHO VA form’s references to `null` produced errors where there was assertion logic checking that expected dependencies were found. 2. Early Web Forms work produced the same, for a time at least producing errors in the console. This produced a lot of distracting noise that made it harder to identify actual implementation errors in dependency resolution. 3. Subsequent improvements to dependency resolution have been successful enough that we’ve even eschewed logging when a dependency lookup doesn’t resolve (though I sometimes add it in local dev for testing/validation), at least as of #67. 4. As of #135, dependency resolution was expanded to be form-wide and match all possible nodes; there’s no case where a `null` reference **should** match a node and won’t. I can imagine these potentially useful followup changes: 1. On parse, identify any path sub-expressions which **will never** resolve to any node in the form. 2. Short circuit lookup of such never-resolvable paths. There’s no sense walking the full form tree for something we know we won’t find! 3. Potentially warn when such never-resolvable paths are found. This wouldn’t be particularly useful for the `null` NameTest specifically (where the intent at least in WHO VA is clearly a null reference), but it could be useful for catching typos and other mistaken references like hierarchy confusion.
- Loading branch information