-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correctly handle module that only set package.loaded #6
Conversation
Hello, You fixed the |
I start to make a full require behavior tests ... |
i'll have a look, but I only use 5.2 on a regular basis... |
ok, fixed |
Thanks, this is a very good catch, quite embarrassing, to be honest :-) The test suite most welcome. You may want to add I'll review it all tomorrow. |
@pygy are you waiting for a new patch for me with the fix ? i'm not sure what you want
Of course, if you think that's important I can add it, but i'm not 100% convinced... |
@boucman that was about the test suite, not your patch. At first glance, it looks fine, but I'll have to review it more thoroughly. I've had a hectic week (baby born earlier today after a problematic pregnancy for my gf. All's fine now :-)), which left me little time for this. Hopefully I'll have time tomorrow evening. |
no worries, take your time... this is already fixed in the local copy of darktable, so we are not blocked by this bug my question was more because of the first part : i.e did you expect anything from me.... since that's not the case, I'll just wait. No problem |
any news ? (I don't mind, I have a local fix, but other users might get bitten by this bug) |
I'll look into this later today.
|
awesome, thx |
correctly handle module that only set package.loaded
Thanks a lot. Now I must do the Luarocks dance :-) |
@tst2005 could you send a pull request with your test suite so that you're correctly credited in the Git log and project stats? |
running these two scripts yield different results
(these assume you have luasec installed, apt-get install lua-sec under debian)
will print table: 0x25ef070 (or similar)
will print nil
This is because ssl.https uses the "module" function and that function sets package.loaded["ssl.https"] which, in turn, means the function doesn't have to return anything.
According to lua documentation (and the way the original require works) this is a legal thing to do and require should return the value of package.loaded["ssl.https"] in that case