Open wqferr opened 10 months ago
The only solution I see presently is to port my entire application over to JS and use Fengari exclusively to load my libraries... Which I'd rather not do.
OK so progress on the problem: it seems my editor wasn't updating the file's last edited timestamp, not sure why that would ever happen, but once I touch
ed the file, it instantly updated. This will serve as a workaround for now.
Not sure there's anything you can (or should) do with this issue, this is very clearly a problem with my setup. I'll leave the issue open to let you know what happened and see what you do (if you do) anything about it.
NOPE never mind, touch
ing the file doesn't always work. I'm lost guys, please help.
Further testing seems to show that it only ever happens in Firefox, but I need to investigate more
Testing concluded this still happens on chrome. No idea what causes it. It's not caching (at least not in any form I can disable).
Are you just running into the fact that require
caches the loaded module?
Wouldn't touch
ing the file invalidate the cache? Also how does it cache the module between server restarts? Do you save the module elsewhere on the disk?
Also if that were the case, I wouldn't simultaneously have a different problem: when multiple files require the same module, they get different copies. I know this because one of my modules does a metatable comparison, and in one file it was passing while not in the other.
Is there a way to disable these functions? They are getting in the way more than helping.
Thank you for the quick reply though.
require
in fengari caches until the page is reloaded. It's not related to the server side
Then the behavior I encountered wasn't caching, because it kept happening even when force reloading the page with no cache.
I'm trying to use Fengari on a personal project, but it sometimes just... stops updating my module return values? For instance, I'll add a new function to the table, and then Fengari just decides it doesn't exist. Every other field previous to that is fine, but the new one disappears.
I've tried restarting my web server to no avail, I'm kind of lost at this point. I want to use Fengari but this is making it really difficult for me.