Re: Webv4 trouble
By: echicken to mark lewis on Tue Aug 20 2019 10:28 am
Re: Webv4 trouble
By: mark lewis to echicken on Tue Aug 20 2019 08:36:40
mods/load/
exec/load/
mods/
exec/
FWIW this order comes from Sync's JS documentation, so I'm trusting it's correct.
I just did a test using jsexec and did not get the results I expect. I'll have to mess around with it some more later.
does the above also include
mods/load/tickit
for modified/added tickit modules? if so i have a few load files to move ;)
Based on the stated order, my expectation would be this:
if mods/load/tickit/[module].js exists, load it
else if exec/load/tickit/[module].js exists, load it
else if mods/tickit/[module].js exists, load it
else load exec/tickit/[module].js and throw error if it doesn't exist
However I'm fairly certain that in the past I've overridden stuff in exec/load/ by duping it in mods/ (not mods/load/), so I'm not sure what to believe.
It depends on how the script is invoked. "exec" is different than "load".
When a script is "executed" (e.g. via Baja "exec_bin", or a "*module" or "?module" command-line or loadable-module setting in SCFG), the search order is:
1. mods
2. exec
When a script is "loaded" (via JS "load" or "require"), the search order is:
1. js.exec_dir (location of executed script performing the load)
2. mods/[load_path_list] (sbbs.ini JavaScriptLoadPath)
3. mods
4. [load_path_list] (sbbs.ini JavaScriptLoadPath)
5. exec
The load_path_list is by default, just "load".
The search order is moot if an absolute filepath is executed or loaded.
Is that clear as mud? :-)
digital man
Synchronet/BBS Terminology Definition #12:
CBM = Commodore Business Machines
Norco, CA WX: 66.3oF, 85.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.08-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)