2026/06/04

From WoozleCodes
< 2026 | 06
Jump to navigation Jump to search
Thursday, June 4, 2026 (#155)
Wednesday Thursday Friday posts:prev <this> next

References

Working on Ferreteria FileSys stuff in order to support sftp in FTM. Relevant pages:

20:33

Okay, we have another logic-puzzle 🙃.

  • "PathChain::$OLeaf must not be accessed before initialization in Ferreteria/v0.6/clade/Sys/FileSys/Aspect/Ident/spex/PathChain.php:47"
    • ...but I don't understand why it isn't already initialized.
  • FileSys/Node.php(42) calls WildClass::FromUnknown($fs), which then:
    • ...creates an instance of itself ($oThis) and calls $oThis->OIdent->OSpec->FromURL($fs) to create a non-Wild instance of itself... ahh, got it. I needed to call that one $oTemp and then capture $oThis from the return-value of $oTemp->OIdent->OSpec->FromURL($fs).

Next logic-puzzle:

  • "Undefined property: PathChain::$OIdent in Wild.php on line 30"
    • "line 30" is in FromUnknown(string $fs) where I'm calling $oThis->OIdent->SpecFull() as a test (to catch the bug here rather than later).
      • Why doesn't OIdent exist? Oh, because $oThis is a PathChain, not a Node. Okay... so, where am I and what should I actually be doing...
  • What I'm trying to do in FromUnknown(string $fs) is create a new Wild instance and initialize it sufficiently to access ->OIdent->OVenue->Exists.
  • ...and what's happening now is that $oChain->OLeaf isn't being initialized when $oChain is created by FromURL($fs). Why the hecks is this not happening.
    • Answer: Apparently because I renamed SSpec to SURL (because it's more than just a filespec), but didn't remove all references to SSpec, including in the setup phase.

Fixing that gets us a Wild Node-object, but $oWild->OIdent->OVenue->Exists still fails because creating OVenue calls NewProto() [1] which calls SpecFull() which needs to read $SURL which needs to read $OLeaf in order to call Leaf->SpecAbs().

Now, does this in fact make any sense...

Untangling side-note: maybe we need some less ambiguous terminology here. How about:

  • PSpec means "path spec", i.e. a path within a given device
  • USpec stands for "universal spec" (or "URL spec"), a path which can specify a device or protocol as well as the path within the target

Footnote

  1. ...which should be renamed NewVenue(), but deal with that later.