diff --git a/CLI/Coverage.h b/CLI/include/Luau/Coverage.h similarity index 100% rename from CLI/Coverage.h rename to CLI/include/Luau/Coverage.h diff --git a/CLI/FileUtils.h b/CLI/include/Luau/FileUtils.h similarity index 100% rename from CLI/FileUtils.h rename to CLI/include/Luau/FileUtils.h diff --git a/CLI/Flags.h b/CLI/include/Luau/Flags.h similarity index 100% rename from CLI/Flags.h rename to CLI/include/Luau/Flags.h diff --git a/CLI/Profiler.h b/CLI/include/Luau/Profiler.h similarity index 100% rename from CLI/Profiler.h rename to CLI/include/Luau/Profiler.h diff --git a/CLI/Repl.h b/CLI/include/Luau/Repl.h similarity index 100% rename from CLI/Repl.h rename to CLI/include/Luau/Repl.h diff --git a/CLI/Require.h b/CLI/include/Luau/Require.h similarity index 100% rename from CLI/Require.h rename to CLI/include/Luau/Require.h diff --git a/CLI/Analyze.cpp b/CLI/src/Analyze.cpp similarity index 99% rename from CLI/Analyze.cpp rename to CLI/src/Analyze.cpp index bc78f7cb3..e10a2c2ed 100644 --- a/CLI/Analyze.cpp +++ b/CLI/src/Analyze.cpp @@ -7,9 +7,9 @@ #include "Luau/TypeAttach.h" #include "Luau/Transpiler.h" -#include "FileUtils.h" -#include "Flags.h" -#include "Require.h" +#include "Luau/FileUtils.h" +#include "Luau/Flags.h" +#include "Luau/Require.h" #include #include diff --git a/CLI/Ast.cpp b/CLI/src/Ast.cpp similarity index 98% rename from CLI/Ast.cpp rename to CLI/src/Ast.cpp index b5a922aaa..5341d8892 100644 --- a/CLI/Ast.cpp +++ b/CLI/src/Ast.cpp @@ -8,7 +8,7 @@ #include "Luau/ParseOptions.h" #include "Luau/ToString.h" -#include "FileUtils.h" +#include "Luau/FileUtils.h" static void displayHelp(const char* argv0) { diff --git a/CLI/Bytecode.cpp b/CLI/src/Bytecode.cpp similarity index 99% rename from CLI/Bytecode.cpp rename to CLI/src/Bytecode.cpp index 2da9570b2..dc8e48338 100644 --- a/CLI/Bytecode.cpp +++ b/CLI/src/Bytecode.cpp @@ -7,8 +7,8 @@ #include "Luau/BytecodeBuilder.h" #include "Luau/Parser.h" #include "Luau/BytecodeSummary.h" -#include "FileUtils.h" -#include "Flags.h" +#include "Luau/FileUtils.h" +#include "Luau/Flags.h" #include diff --git a/CLI/Compile.cpp b/CLI/src/Compile.cpp similarity index 99% rename from CLI/Compile.cpp rename to CLI/src/Compile.cpp index 7d95387c3..e8498beb6 100644 --- a/CLI/Compile.cpp +++ b/CLI/src/Compile.cpp @@ -8,8 +8,8 @@ #include "Luau/Parser.h" #include "Luau/TimeTrace.h" -#include "FileUtils.h" -#include "Flags.h" +#include "Luau/FileUtils.h" +#include "Luau/Flags.h" #include diff --git a/CLI/Coverage.cpp b/CLI/src/Coverage.cpp similarity index 98% rename from CLI/Coverage.cpp rename to CLI/src/Coverage.cpp index a509ab89a..7330d492d 100644 --- a/CLI/Coverage.cpp +++ b/CLI/src/Coverage.cpp @@ -1,5 +1,5 @@ // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#include "Coverage.h" +#include "Luau/Coverage.h" #include "lua.h" diff --git a/CLI/FileUtils.cpp b/CLI/src/FileUtils.cpp similarity index 99% rename from CLI/FileUtils.cpp rename to CLI/src/FileUtils.cpp index 6925e99f1..fcdcad9e0 100644 --- a/CLI/FileUtils.cpp +++ b/CLI/src/FileUtils.cpp @@ -1,5 +1,5 @@ // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#include "FileUtils.h" +#include "Luau/FileUtils.h" #include "Luau/Common.h" diff --git a/CLI/Flags.cpp b/CLI/src/Flags.cpp similarity index 100% rename from CLI/Flags.cpp rename to CLI/src/Flags.cpp diff --git a/CLI/Profiler.cpp b/CLI/src/Profiler.cpp similarity index 100% rename from CLI/Profiler.cpp rename to CLI/src/Profiler.cpp diff --git a/CLI/Reduce.cpp b/CLI/src/Reduce.cpp similarity index 99% rename from CLI/Reduce.cpp rename to CLI/src/Reduce.cpp index 7f8c459c7..e66d80dc9 100644 --- a/CLI/Reduce.cpp +++ b/CLI/src/Reduce.cpp @@ -5,7 +5,7 @@ #include "Luau/Parser.h" #include "Luau/Transpiler.h" -#include "FileUtils.h" +#include "Luau/FileUtils.h" #include #include diff --git a/CLI/Repl.cpp b/CLI/src/Repl.cpp similarity index 99% rename from CLI/Repl.cpp rename to CLI/src/Repl.cpp index 3bda38f1d..2dec1d8c6 100644 --- a/CLI/Repl.cpp +++ b/CLI/src/Repl.cpp @@ -1,5 +1,5 @@ // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#include "Repl.h" +#include "Luau/Repl.h" #include "Luau/Common.h" #include "lua.h" @@ -10,11 +10,11 @@ #include "Luau/Parser.h" #include "Luau/TimeTrace.h" -#include "Coverage.h" -#include "FileUtils.h" -#include "Flags.h" -#include "Profiler.h" -#include "Require.h" +#include "Luau/Coverage.h" +#include "Luau/FileUtils.h" +#include "Luau/Flags.h" +#include "Luau/Profiler.h" +#include "Luau/Require.h" #include "isocline.h" diff --git a/CLI/ReplEntry.cpp b/CLI/src/ReplEntry.cpp similarity index 89% rename from CLI/ReplEntry.cpp rename to CLI/src/ReplEntry.cpp index 8543e3f78..7e5f9e064 100644 --- a/CLI/ReplEntry.cpp +++ b/CLI/src/ReplEntry.cpp @@ -1,5 +1,5 @@ // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#include "Repl.h" +#include "Luau/Repl.h" int main(int argc, char** argv) { diff --git a/CLI/Require.cpp b/CLI/src/Require.cpp similarity index 99% rename from CLI/Require.cpp rename to CLI/src/Require.cpp index 4c1c3ac63..94bdd5443 100644 --- a/CLI/Require.cpp +++ b/CLI/src/Require.cpp @@ -1,7 +1,7 @@ // This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#include "Require.h" +#include "Luau/Require.h" -#include "FileUtils.h" +#include "Luau/FileUtils.h" #include "Luau/Common.h" #include "Luau/Config.h" @@ -301,4 +301,4 @@ bool RequireResolver::parseConfigInDirectory(const std::string& directory) } return true; -} \ No newline at end of file +} diff --git a/CLI/Web.cpp b/CLI/src/Web.cpp similarity index 100% rename from CLI/Web.cpp rename to CLI/src/Web.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 11f034a30..51f29e4f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ include(Sources.cmake) target_include_directories(Luau.Common INTERFACE Common/include) target_compile_features(Luau.CLI.lib PUBLIC cxx_std_17) +target_include_directories(Luau.CLI.lib PUBLIC CLI/include) target_link_libraries(Luau.CLI.lib PRIVATE Luau.Common) target_compile_features(Luau.Ast PUBLIC cxx_std_17) diff --git a/Sources.cmake b/Sources.cmake index 1adbe862e..ae1223154 100644 --- a/Sources.cmake +++ b/Sources.cmake @@ -389,36 +389,38 @@ target_sources(isocline PRIVATE # Common sources shared between all CLI apps target_sources(Luau.CLI.lib PRIVATE - CLI/FileUtils.cpp - CLI/Flags.cpp - CLI/Flags.h - CLI/FileUtils.h + CLI/include/Luau/FileUtils.h + CLI/include/Luau/Flags.h + + CLI/src/FileUtils.cpp + CLI/src/Flags.cpp ) if(TARGET Luau.Repl.CLI) # Luau.Repl.CLI Sources target_sources(Luau.Repl.CLI PRIVATE - CLI/Coverage.h - CLI/Coverage.cpp - CLI/Profiler.h - CLI/Profiler.cpp - CLI/Repl.cpp - CLI/ReplEntry.cpp - CLI/Require.cpp) + CLI/include/Luau/Coverage.h + CLI/include/Luau/Profiler.h + + CLI/src/Coverage.cpp + CLI/src/Profiler.cpp + CLI/src/Repl.cpp + CLI/src/ReplEntry.cpp + CLI/src/Require.cpp) endif() if(TARGET Luau.Analyze.CLI) # Luau.Analyze.CLI Sources target_sources(Luau.Analyze.CLI PRIVATE - CLI/Analyze.cpp - CLI/Require.cpp + CLI/src/Analyze.cpp + CLI/src/Require.cpp ) endif() if(TARGET Luau.Ast.CLI) # Luau.Ast.CLI Sources target_sources(Luau.Ast.CLI PRIVATE - CLI/Ast.cpp + CLI/src/Ast.cpp ) endif() @@ -543,12 +545,13 @@ endif() if(TARGET Luau.CLI.Test) # Luau.CLI.Test Sources target_sources(Luau.CLI.Test PRIVATE - CLI/Coverage.h - CLI/Coverage.cpp - CLI/Profiler.h - CLI/Profiler.cpp - CLI/Repl.cpp - CLI/Require.cpp + CLI/include/Luau/Coverage.h + CLI/include/Luau/Profiler.h + + CLI/src/Coverage.cpp + CLI/src/Profiler.cpp + CLI/src/Repl.cpp + CLI/src/Require.cpp tests/RegisterCallbacks.h tests/RegisterCallbacks.cpp @@ -560,24 +563,24 @@ endif() if(TARGET Luau.Web) # Luau.Web Sources target_sources(Luau.Web PRIVATE - CLI/Web.cpp) + CLI/src/Web.cpp) endif() if(TARGET Luau.Reduce.CLI) # Luau.Reduce.CLI Sources target_sources(Luau.Reduce.CLI PRIVATE - CLI/Reduce.cpp + CLI/src/Reduce.cpp ) endif() if(TARGET Luau.Compile.CLI) # Luau.Compile.CLI Sources target_sources(Luau.Compile.CLI PRIVATE - CLI/Compile.cpp) + CLI/src/Compile.cpp) endif() if(TARGET Luau.Bytecode.CLI) # Luau.Bytecode.CLI Sources target_sources(Luau.Bytecode.CLI PRIVATE - CLI/Bytecode.cpp) + CLI/src/Bytecode.cpp) endif() diff --git a/tests/Repl.test.cpp b/tests/Repl.test.cpp index 71a46878d..5667badbc 100644 --- a/tests/Repl.test.cpp +++ b/tests/Repl.test.cpp @@ -2,7 +2,7 @@ #include "lua.h" #include "lualib.h" -#include "Repl.h" +#include "Luau/Repl.h" #include "ScopedFlags.h" #include "doctest.h" diff --git a/tests/RequireByString.test.cpp b/tests/RequireByString.test.cpp index 574a45611..4f225eb3d 100644 --- a/tests/RequireByString.test.cpp +++ b/tests/RequireByString.test.cpp @@ -6,8 +6,8 @@ #include "lua.h" #include "lualib.h" -#include "Repl.h" -#include "FileUtils.h" +#include "Luau/Repl.h" +#include "Luau/FileUtils.h" #include "doctest.h"