question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Macro flaws included for recursively sub-renders in other pages

See original GitHub issue

If you open http://localhost:3000/en-US/docs/Web/HTML/Element/img#_flaws you’ll see that it complains about a MacroRedirectedLinkError on line 1212. But that flaw is actually not in this page. This page (en-us/web/html/element/img/index.html) only has 417 lines! So, this flaw shouldn’t even be mentioned when you press the “Show flaws” button.

The actual macro flaw is actually in http://localhost:3000/en-US/docs/Web/Media/Formats/Image_types#_flaws There, it should appear when you press the “Show flaws” button.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
escattonecommented, Jul 14, 2020

@peterbe Here are my initial thoughts. What you’re describing, knowing which macro in the original document’s raw HTML forced the rendering of other documents which then had errors, would be a nice thing to have. The problem is that it gets very complicated depending on how detailed we want to get. For instance, in the example you cited (http://localhost:3000/en-us/docs/web/html/element/input/number), there are 3 places in the raw HTML that call the page macro asking for various sections of http://localhost:3000/en-us/docs/web/html/element/input/text:

line 100 --> {{page("/en-US/docs/Web/HTML/Element/input/text", "list", 0, 1, 2)}}
line 114 --> {{page("/en-US/docs/Web/HTML/Element/input/text", "placeholder", 0, 1, 2)}}
line 116 --> {{page("/en-US/docs/Web/HTML/Element/input/text", "readonly", 0, 1, 2)}}

so it’s impossible to point to a single line in the raw HTML of /en-us/docs/web/html/element/input/number that introduces the rendering of /en-us/docs/web/html/element/input/text and its associated MacroBrokenLinkError’s. Any one of those 3 lines, those page macro calls, would introduce the prerequisite. Also, since the page macro is typically used to extract only a specific section of a prerequisite document, it’s difficult to know if the extracted section actually includes any of the non-fatal errors (like MacroBrokenLinkError) that may have occurred while rendering that prerequisite.

Because of this complexity and all of the other work we have to do, I suspect it’s not worth getting bogged down in these details to determine an elegant approach at the moment, and maybe for now we should go with some kind of quickfix?

0reactions
peterbecommented, Aug 12, 2020

Pretty sure it’s no longer a problem. We don’t get crazy recursion any more and we have a solution to the “Show flaws” UI to alert when you’re seeing a macro flaw coming from a prerequisite.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can we have recursive macros? - Stack Overflow
Your argument is flawed. The macro replacement algorithm is repeated if your macros contains other macros (until no more substitution is done).
Read more >
Clojure macros by example: recursive comparison chaining
Your browser can't play this video. Learn more. Switch camera.
Read more >
https://github.com/apache/incubator-storm/pull/130...
+ (ns backtype.storm.bootstrap) -(defmacro bootstrap [] +(defmacro ... +(defn topology-page + [id window include-sys?] ... Not recursive.
Read more >
https://code.wildfiregames.com/rP16183?diff=1
event is passed to other handlers if false is returned. ... JS::HandleValue initData) { // The page stack is cleared (including the script...
Read more >
for-example-rfc.txt - OASIS Open
For example, rfc1009.txt: For example, hosts with embedded gateway code that rfc1009.txt: For example, the routing protocol issues (see Sections ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found