meta checking semantics
In implementation.md
, near !279 (merged), I wrote:
(Doing this with two macro calls means that if a template is misreferenced, the user gets two errors. But the alternative is threading all the expansions through this chaining, which is confusing, and means that the first missing template would stop all processing.)
I think we may want to change this.
The current approach detects recognised meta attributes statically. From reference.md
:
Any appropriate
Xmeta
reference in the template counts - even if that part of the template is not expanded. So complex templates may need to explicitly detect and reject inappropriate combinations of attributes.
These semantics look like they might be hard to implement, and also confusing and arguably bizarre, in combination with other proposed features (notably meta attr dynamic binding #36/#40/#48 and modularity features #35/#39).
I think it may be necessary to try out the alternative approach, which probably involves a Cell
in each attribute saying if it has been used, and macro-to-macro chaining. (The template export test will need some souping up to check it all works as expected.)
Because of the difference in calling convention, this would be a total pub_template_semver
breaking change. (The minor difference in semantics might be regarded as "minor breaking".)