sbrl / Minetest-WorldEditAdditions

Extra tools and commands to extend WorldEdit for Minetest
https://worldeditadditions.mooncarrot.space/
Mozilla Public License 2.0
16 stars 3 forks source link

Undeclared global variable "table_contains" at tables/table_contains.lua:13 #67

Closed Bastrabun closed 3 years ago

Bastrabun commented 3 years ago

2021-07-15 17:51:00: WARNING[Main]: Undeclared global variable "table_contains" accessed at ...tions/worldeditadditions/utils/tables/table_contains.lua:13

sbrl commented 3 years ago

Hey there, @Bastrabun! Thanks for the report. I need some more info to debug this.

Many thanks :-)

Bastrabun commented 3 years ago

Happened with 442cb8a8d84e611df95d85ffd9b45d379222a984 and installed via git pull

Doesn't happen in the latest main 496d41731a1efc30bdb033bfead28324822fa1ac

Now this happens:

2021-07-18 07:37:26: WARNING[Main]: Undeclared global variable "bit" accessed at ...test-WorldEditAdditions/worldeditadditions/utils/bit.lua:15

Repro: Have Worldeditaddtions enabled in world.mt and start the server. It happens during the startup sequence.

Minetest version 5.4.1 in all cases

Woah, there's a lot happening lately in this mod, maybe I wait until you're done before reporting small-scale issues like this :D

VorTechnix commented 3 years ago

Wow a bug report from someone other than me!

2021-07-18 07:37:26: WARNING[Main]: Undeclared global variable "bit" accessed at ...test-WorldEditAdditions/worldeditadditions/utils/bit.lua:15

This is a strange report because WorldEditAdditions/worldeditadditions/utils/bit.lua doesn't exist (at least since the last release).

image

It goes from axes.lua to lru_benchmark.lua so this is very mysterious.

Also for reproducing did you mean "Have load_mod_worldeditadditions = true in world.mt and start the server."?

Lastly have you tried deleting your local repository and re-cloning main? It could be there's a bad delta causing ghost code.

sbrl commented 3 years ago

Doesn't happen in the latest main 496d417

Glad to hear it! I thought I'd fixed that one.

2021-07-18 07:37:26: WARNING[Main]: Undeclared global variable "bit" accessed at ...test-WorldEditAdditions/worldeditadditions/utils/bit.lua:15

This is a strange report because WorldEditAdditions/worldeditadditions/utils/bit.lua doesn't exist (at least since the last release).

WorldEditAdditions/worldeditadditions/utils/bit.lua does exist in the latest main - I added it yesterday to centralise the bitwise operation polyfills that WorldEditAdditions uses. You can safely ignore that error @Bastrabun -- it shouldn't do any harm. WorldEditAdditions checks to see if the bit global already exists you see before loading the polyfill.

I'll look at fixing it though to avoid the warning in peoples' logs :-)

I think we can close this issue now, but if you encounter any futher issues please do let us know and we'll look into it :-)