2024/11/14/untangling setup calls: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
This is mainly notes to myself, trying to figure out why my code is complaining about there not being any input parameters before it has actually processed them...
This is mainly notes to myself, trying to figure out why my code is complaining about there not being any input parameters before it has actually processed them...
 
==Before Fix Attempt==
First call to Setup():
First call to Setup():
<pre>
<pre>
Line 25: Line 25:
(The two calls are separated by a couple of screenfulls of other diagnostic info I'm not ready to remove yet; I needed to see them next to each other.)
(The two calls are separated by a couple of screenfulls of other diagnostic info I'm not ready to remove yet; I needed to see them next to each other.)


The key sequences seem to be:
The key call-chains seem to be:
* [Fe:App->Go()] => [Fu:App->EmitStartup()] => [Fu:WUIDL App->SetupIface()] => [Fu:WUIDL Kiosk->Setup()]
* [Fe:App->Go()] => [Fu:App->EmitStartup()] => [Fu:WUIDL App->SetupIface()] => [Fu:WUIDL Kiosk->Setup()]
* [Fe:App->Go()] => [Fu:App->ReceiveRequest()] => [Fe:Root Kiosk->Go()] => [Fu:WUIDL Kiosk->Setup()]
* [Fe:App->Go()] => [Fu:App->ReceiveRequest()] => [Fe:Root Kiosk->Go()] => [Fu:WUIDL Kiosk->Setup()]


"EmitStartup" seems like maybe a poor choice of words, or an inaccurate description. I think maybe the problem is that it doesn't match what actually needs to be done, which is "describe the app once it has fully started but before it does anything".
"EmitStartup" seems like maybe a poor choice of words, or an inaccurate description. I think maybe the problem is that it doesn't match what actually needs to be done, which is "describe the app once it has fully started but before it does anything".
==After Fix #1==
First call to Setup():
<pre>
| nArrIndex | sFileSpec                            | nFileLine | sCallClass                          | sCallType | sCallFunc  | aCallArgs | oCallObj |
|        3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk |    ->    | ShowStack  |
|        4 | [F] /apps/futils/src/App/WUIDL.php  |        23 | Woozalia\Futil\Kiosk\caWUIDL        |    ->    | Setup      |
|        5 | [F] /src/App.php                    |        80 | Woozalia\Futil\App\cWUIDL          |    ->    | SetupIface  |
|        6 | [F] /src/App.php                    |        75 | Woozalia\Ferret\caApp              |    ->    | Setup      |
|        7 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp              |    ->    | Go          |
|        8 | [F] /apps/futils/boot/go.php        |        42 | Woozalia\Futil\DBA\cBoot            |    ->    | Go          |
|        9 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot          |    ->    | __construct |
</pre>
Second call to Setup():
<pre>
| nArrIndex | sFileSpec                            | nFileLine | sCallClass                              | sCallType | sCallFunc      | aCallArgs | oCallObj |
|        3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk      |    ->    | ShowStack      |
|        4 | [F] /src/Sys/Routing/Kiosk/Root.php  |        72 | Woozalia\Futil\Kiosk\caWUIDL            |    ->    | Setup          |
|        5 | [F] /src/App/Routed.php              |        23 | Woozalia\Ferret\Sys\Routing\Kiosk\caRoot |    ->    | Go            |
|        6 | [F] /src/App.php                    |        81 | Woozalia\Futil\caApp                    |    ->    | ReceiveRequest |
|        7 | [F] /src/App.php                    |        75 | Woozalia\Ferret\caApp                    |    ->    | Setup          |
|        8 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp                    |    ->    | Go            |
|        9 | [F] /apps/futils/boot/go.php        |        42 | Woozalia\Futil\DBA\cBoot                |    ->    | Go            |
|        10 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot              |    ->    | __construct    |
</pre>
Key call-chains:
* [Fe:App->Go()] => [Fe:App->Setup()] => [Fu:SetupIface()] => [Fu:WUIDL Kiosk->Setup()]
* [Fe:App->Go()] => [Fe:App->Setup()] => [Fu:ReceiveRequest()] => [Fe:Root Kiosk->Go()] => [Fu:WUIDL Kiosk->Setup()]
So improve. Very remediation. Wow.

Revision as of 16:53, 14 November 2024

This is mainly notes to myself, trying to figure out why my code is complaining about there not being any input parameters before it has actually processed them...

Before Fix Attempt

First call to Setup():

| nArrIndex | sFileSpec                            | nFileLine | sCallClass                          | sCallType | sCallFunc   | aCallArgs | oCallObj |
|         3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk |    ->     | ShowStack   |
|         4 | [F] /apps/futils/src/App/WUIDL.php   |        22 | Woozalia\Futil\Kiosk\caWUIDL        |    ->     | Setup       |
|         5 | [F] /apps/futils/src/App.php         |        46 | Woozalia\Futil\App\cWUIDL           |    ->     | SetupIface  |
|         6 | [F] /src/App.php                     |        49 | Woozalia\Futil\caApp                |    ->     | EmitStartup |
|         7 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp               |    ->     | Go          |
|         8 | [F] /apps/futils/boot/go.php         |        42 | Woozalia\Futil\DBA\cBoot            |    ->     | Go          |
|         9 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot          |    ->     | __construct |

Second call to Setup():

| nArrIndex | sFileSpec                            | nFileLine | sCallClass                               | sCallType | sCallFunc      | aCallArgs | oCallObj |
|         3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk      |    ->     | ShowStack      |
|         4 | [F] /src/Sys/Routing/Kiosk/Root.php  |        72 | Woozalia\Futil\Kiosk\caWUIDL             |    ->     | Setup          |
|         5 | [F] /src/App/Routed.php              |        23 | Woozalia\Ferret\Sys\Routing\Kiosk\caRoot |    ->     | Go             |
|         6 | [F] /src/App.php                     |        75 | Woozalia\Futil\caApp                     |    ->     | ReceiveRequest |
|         7 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp                    |    ->     | Go             |
|         8 | [F] /apps/futils/boot/go.php         |        42 | Woozalia\Futil\DBA\cBoot                 |    ->     | Go             |
|         9 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot               |    ->     | __construct    |

(The two calls are separated by a couple of screenfulls of other diagnostic info I'm not ready to remove yet; I needed to see them next to each other.)

The key call-chains seem to be:

  • [Fe:App->Go()] => [Fu:App->EmitStartup()] => [Fu:WUIDL App->SetupIface()] => [Fu:WUIDL Kiosk->Setup()]
  • [Fe:App->Go()] => [Fu:App->ReceiveRequest()] => [Fe:Root Kiosk->Go()] => [Fu:WUIDL Kiosk->Setup()]

"EmitStartup" seems like maybe a poor choice of words, or an inaccurate description. I think maybe the problem is that it doesn't match what actually needs to be done, which is "describe the app once it has fully started but before it does anything".

After Fix #1

First call to Setup():

| nArrIndex | sFileSpec                            | nFileLine | sCallClass                          | sCallType | sCallFunc   | aCallArgs | oCallObj |
|         3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk |    ->     | ShowStack   |
|         4 | [F] /apps/futils/src/App/WUIDL.php   |        23 | Woozalia\Futil\Kiosk\caWUIDL        |    ->     | Setup       |
|         5 | [F] /src/App.php                     |        80 | Woozalia\Futil\App\cWUIDL           |    ->     | SetupIface  |
|         6 | [F] /src/App.php                     |        75 | Woozalia\Ferret\caApp               |    ->     | Setup       |
|         7 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp               |    ->     | Go          |
|         8 | [F] /apps/futils/boot/go.php         |        42 | Woozalia\Futil\DBA\cBoot            |    ->     | Go          |
|         9 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot          |    ->     | __construct |

Second call to Setup():

| nArrIndex | sFileSpec                            | nFileLine | sCallClass                               | sCallType | sCallFunc      | aCallArgs | oCallObj |
|         3 | [F] /apps/futils/src/Kiosk/WUIDL.php |        89 | Woozalia\Ferret\Sys\Routing\caKiosk      |    ->     | ShowStack      |
|         4 | [F] /src/Sys/Routing/Kiosk/Root.php  |        72 | Woozalia\Futil\Kiosk\caWUIDL             |    ->     | Setup          |
|         5 | [F] /src/App/Routed.php              |        23 | Woozalia\Ferret\Sys\Routing\Kiosk\caRoot |    ->     | Go             |
|         6 | [F] /src/App.php                     |        81 | Woozalia\Futil\caApp                     |    ->     | ReceiveRequest |
|         7 | [F] /src/App.php                     |        75 | Woozalia\Ferret\caApp                    |    ->     | Setup          |
|         8 | [F] /apps/futils/run/dba/go.php      |        39 | Woozalia\Ferret\caApp                    |    ->     | Go             |
|         9 | [F] /apps/futils/boot/go.php         |        42 | Woozalia\Futil\DBA\cBoot                 |    ->     | Go             |
|        10 | [F] /apps/futils/run/dba/go.php      |        44 | Woozalia\Futil\boot\caBoot               |    ->     | __construct    |

Key call-chains:

  • [Fe:App->Go()] => [Fe:App->Setup()] => [Fu:SetupIface()] => [Fu:WUIDL Kiosk->Setup()]
  • [Fe:App->Go()] => [Fe:App->Setup()] => [Fu:ReceiveRequest()] => [Fe:Root Kiosk->Go()] => [Fu:WUIDL Kiosk->Setup()]

So improve. Very remediation. Wow.