perbone / luascript

Lua language support for Godot Engine
Apache License 2.0
629 stars 44 forks source link

AttributeError: 'SConsEnvironment' object has no attribute 'editor_build' #59

Closed infdivzero closed 1 year ago

infdivzero commented 1 year ago

Happens on line 23 of modules/luascript/SCsub. Is there another setting I should set besides module_luascript_enabled=yes?

Not sure if this second part is related but something is missing here too. If that check on 23 and 24 is commented out, the build gets past that step but fails with:

In file included from modules/register_module_types.gen.cpp:26:
./modules/luascript/register_types.h:24:6: error: variable or field 'initialize_luascript_module' declared void
   24 | void initialize_luascript_module(ModuleInitializationLevel p_level);
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[Initial build] ./modules/luascript/register_types.h:24:34: error: 'ModuleInitializationLevel' was not declared in this scope
   24 | void initialize_luascript_module(ModuleInitializationLevel p_level);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
./modules/luascript/register_types.h:25:6: error: variable or field 'uninitialize_luascript_module' declared void
   25 | void uninitialize_luascript_module(ModuleInitializationLevel p_level);
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Initial build] ./modules/luascript/register_types.h:25:36: error: 'ModuleInitializationLevel' was not declared in this scope
   25 | void uninitialize_luascript_module(ModuleInitializationLevel p_level);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
modules/register_module_types.gen.cpp: In function 'void register_module_types()':
modules/register_module_types.gen.cpp:115:2: error: 'register_luascript_types' was not declared in this scope; did you mean 'register_gdscript_types'?
  115 |  register_luascript_types();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
      |  register_gdscript_types
modules/register_module_types.gen.cpp: In function 'void unregister_module_types()':
modules/register_module_types.gen.cpp:260:2: error: 'unregister_luascript_types' was not declared in this scope; did you mean 'unregister_gdscript_types'?
  260 |  unregister_luascript_types();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |  unregister_gdscript_types

Also happens if only the check is commented out and SConscript('editor/SCsub') is run unconditionally

Cli is scons -j$(nproc) platform=x11 target=release_debug use_lto=yes module_luascript_enabled=yes bits=64 deprecated=no production=yes execinfo=yes, building on Void Linux with Godot 3.5.1-stable

perbone commented 1 year ago

Probably the name of the flag changed. I'll try to fix it soon. Thanks for reporting

perbone commented 1 year ago

So I did a full build with the github sources and didn't find any problems. If you're having compilation issues, it looks like it's just on your machine. try a clean build.