Bug: nodes are missing in dagzet
task id: bug-missing-nodes2024-06-26 16:32: Why are nodes missing in "potential" codestudy? #bug-missing-nodes
2024-06-27 09:39: Quick time looking at the missing nodes #bug-missing-nodes #timelog:00:17:01
2024-06-28 09:40: Back to investigating missing nodes #bug-missing-nodes #timelog:01:25:41
2024-06-28 09:52: =generate_graph_data.lua= and =genpage.lua= #bug-missing-nodes
These are the missing files
2024-06-28 09:55: Run =dz_wikigen.sh= to trigger debug message #bug-missing-nodes
2024-06-28 09:57: The nodelist is not being created correctly. why? #bug-missing-nodes
2024-06-28 10:00: genpage.pagedata: output nodes being made via params.nodelist #bug-missing-nodes
How is this being created?
2024-06-28 10:00: Lua issues, debug flag is not working #bug-missing-nodes
2024-06-28 10:12: Lua function setting the global variable sets it to true somehow? #bug-missing-nodes
2024-06-28 10:13: Oh wait, I was setting this #bug-missing-nodes
2024-06-28 10:18: okay weird. the debug flag is being unset somewhere apparently #bug-missing-nodes
Not the problem I wanted to troubleshoot, but hey I need this for the visibility.
2024-06-28 10:22: more testing for visibility with traverse_node() #bug-missing-nodes
The debug mode flag is never set to true here. Confirmed with printing and filtering output.
Also confirmed that it doesn't matter if you're using the function dbg
I made or checking the variable itself. It's the same. So, I'm pretty sure the dbg
shortcut function is fine.
I need to be able to track down when this is being set, and then unset.
2024-06-28 10:29: the debug flag is definitely being set exactly once #bug-missing-nodes
I think what's happening is the variable is being copied over when it is loaded up in the module. Hoping to fix this by using a big global that can be read everywhere.
2024-06-28 10:35: Okay, global debug flag didn't work. Rethinking approach #bug-missing-nodes
This is NOT what I'm debugging. I just need visibility.
2024-06-28 10:39: Crap. I was setting the debug flag too late. Oh well. #bug-missing-nodes
I have a clumsier approach now, but it works, and I've wasted too much time chasing this pre-bug to improve it.
2024-06-28 10:42: Missing node names show up in input node list supplied to genpage #bug-missing-nodes
Confirmed that the nodes do come up, but they aren't being traversed for whatever reason.
2024-06-28 10:44: Do missing nodes show up in topsort? #bug-missing-nodes
2024-06-28 10:48: Topsort isn't returning enough nodes. Why? #bug-missing-nodes
should be 33, but I'm getting 20.
2024-06-28 11:17: Let's find ou the missing nodes #bug-missing-nodes
I tried looking for something to make sense in the code, but I can't yet see a pattern for what is there and what isn't there.
2024-06-28 11:21: Missing nodes seem to line up with the missing nodes on page #bug-missing-nodes
Clocking out for now
2024-06-29 14:39: Looking at this again today. #bug-missing-nodes #timelog:01:04:58
2024-06-29 14:44: Do the nodes ever make it in the main sort loop? #bug-missing-nodes
Using magsign_cpp
as an example, which currently has the id of 146.
It doesn't seem to be showing up.
2024-06-29 14:52: checking connections #bug-missing-nodes
Connections look right.
2024-06-29 15:01: what are the initial "no incoming nodes"? #bug-missing-nodes
This comes next after populating connections. I have a feeling that calling table.remove
and table.insert
aren't doing the things I expected.
Checking these nodes.
I mean, I guess it looks right?
2024-06-29 15:16: How to trace what would need to happen to reach "cpp" node (missing) #bug-missing-nodes
"cpp" would have to be added to the "no incoming" table. Which, I would expect wouldn't be happening.
The nodes_connected_to
function: which way is the direction? if "nodes connected to A" returns B, is it "B->A" or "A->B"?
It's checking if the node is on the left, so "A->B", so the parent nodes.
If this is true, header_file_looks_like_boilerplate
(id 137) should return the cpp
node (id 134). Let's test this.
It's not showing up. Nevermind that was my fault.
Okay the cpp node is indeed showing up as expected.
2024-06-29 15:39: check how many times cpp node shows up? #bug-missing-nodes
This is insightful: the cpp node shows up 2/3 times. The missing node here is magsign_cpp
. So, cpp
might be forever missing if magsign_cpp
is missing. That's enough for today.
2024-06-30 18:17: Another session of troubleshooting #bug-missing-nodes #timelog:00:51:53
2024-06-30 18:24: Ah, the node IDs changed I think. good for me. #bug-missing-nodes
Actually not too much of an issue, I have enough printing happening now that I can update when/if needed.
2024-06-30 18:29: Examining all the connections now #bug-missing-nodes
The magsign_cpp
is what we are investigating. What would need to happen for it to not show up in cpp
?
2024-06-30 18:33: =magsign_struct= is the only child that doesn't exist #bug-missing-nodes
Not sure if that is helpful or not.
Of the three, It's also the only one that only shows up once as a left-node (it only has one parent node). That parent is magsign_cpp
.
2024-06-30 18:39: It's probably the external nodes. #bug-missing-nodes
As we go down this tree, we are approaching the only two external nodes here: rust/std
and rust/std_iter_zip
. The TOC generates the links just fine, but it just seems like anything that has those links doesn't want to show up.
2024-06-30 18:40: Also, edges for those external are returning NULL. #bug-missing-nodes
What's up with that?
2024-06-30 18:43: People of Earth, we have our smoking gun. #bug-missing-nodes
Removing those external nodes causes it to render properly.
2024-06-30 18:47: Working out another hunch #bug-missing-nodes
I don't think the edges are supposed to be nil, even though they are here.
I have another hunch: there is a local node called "rust", and the namespace for these external nodes also starts with "rust". Going to re-introduce the external nodes, and change the local "rust" node to be "rustrust". It could be that there is some faulty logic related to string matching somewhere.
Neither worked. Okay, so I have to check out those nil edges now.
2024-06-30 18:51: Tracking down those nil edges. #bug-missing-nodes
2024-06-30 19:00: I think I did it. #bug-missing-nodes
While populating a local copy of the edges table (to be pruned later by the topsort algo), I added a check to see if the left node id shows up in the nodes list. If it doesn't, it indicates that it is an externally linked node outside of the namespace.
TL;DR: Check for foreign nodes.
For example nodes like "cpp" and "magsign_cpp" are missing.
It's not being added to the data.