Adding Module Breaks

Hi, when I try to add a new module called ‘EditorTools’ the editor freaks out and the outputs the following and just keeps on printing until the compilation worker dies.

[ 00:23:12.647 ]: [Info] Starting scripts compilation...
[ 00:23:12.647 ]: [Info] Command: F:\Projects/FlaxEngine/Binaries/Tools/Flax.Build.exe -log -logfile= -build -mutex -buildtargets=GameEditorTarget -skiptargets=FlaxEditor -platform=Windows -arch=x64 -configuration=Debug -hotreload=".HotReload.17"
[ 00:23:12.717 ]: [Info] Flax.Build 1.0.0
[ 00:23:13.853 ]: [Info] Missing Android SDK. Cannot build for Android platform.
[ 00:23:13.868 ]: [Info] Building targets...
[ 00:23:13.882 ]: [Info] Building target GameEditorTarget in Debug for Windows x64
[ 00:23:13.887 ]: [Info] Using Windows Toolset v143 (C:\Program Files (x86)\Windows Kits\10\)
Using Windows SDK 10.0.19041.0 (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64)
[ 00:23:13.889 ]: [Info] Building referenced target Flax
[ 00:23:13.925 ]: [Info] Using .NET SDK 7.0.401, runtime 7.0.11 (C:\Program Files\dotnet\)
[ 00:23:14.416 ]: [Info] Loading Libraries: F:\Projects\SwelterCore\Source\Game\..\..\Content\Libraries
[ 00:23:15.068 ]: [Error] Stack overflow.
[ 00:23:15.069 ]: [Error]    at Interop+Kernel32.<GetFileAttributesExPrivate>g____PInvoke|120_0(UInt16*, GET_FILEEX_INFO_LEVELS, WIN32_FILE_ATTRIBUTE_DATA*)
   at System.IO.FileSystem.FillAttributeInfo(System.String, WIN32_FILE_ATTRIBUTE_DATA ByRef, Boolean)
   at System.IO.Directory.Exists(System.String)
   at Flax.Build.Builder.CollectModules(BuildData, Flax.Build.Module, Boolean)
at Flax.Build.Builder.CollectModules(BuildData, Flax.Build.Module, Boolean)
at Flax.Build.Builder.CollectModules(BuildData, Flax.Build.Module, Boolean)
at Flax.Build.Builder.CollectModules(BuildData, Flax.Build.Module, Boolean)
etc.

Module build file (EditorTools.Build.cs):

using Flax.Build;
using Flax.Build.NativeCpp;

public class EditorTools : GameEditorModule
{
    public override void Setup(BuildOptions options)
    {
        base.Setup(options);
        BuildNativeCode = false;

        // Reference game scripts module
        options.PublicDependencies.Add("EditorTools");
    }
}

The build target file (GameEditorTarget.Build.cs):

using Flax.Build;

public class GameEditorTarget : GameProjectEditorTarget
{
    public override void Init()
    {
        base.Init();

        // Reference the modules for editor
        Modules.Add("Game");
        Modules.Add("EditorTools");
    }
}

I was following this tutorial Add Scripts Module but if I make the build script’s class name from EditorTools to EditorToolsEditor as indicated by the tutorial I get an error [00:08:28.187 ]: [Info] Exception: Failed to find source file path for EditorToolsEditor
Also after any change I deleted the Intermediate cache folder.

Ok so you can’t make the Public Dependencies name the same as the module class name or else it breaks… no indicative error. :frowning:

Changed it to:

options.PublicDependencies.Add("Swelter Editor Tools");