2022-07-21 13:36:41 -07:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
|
2025-03-07 15:25:00 +02:00
|
|
|
inline bool isAnalysisFlagExperimental(const char* flag)
|
2022-07-21 13:36:41 -07:00
|
|
|
{
|
|
|
|
// Flags in this list are disabled by default in various command-line tools. They may have behavior that is not fully final,
|
2025-03-07 15:25:00 +02:00
|
|
|
// or critical bugs that are found after the code has been submitted. This list is intended _only_ for flags that affect
|
|
|
|
// Luau's type checking. Flags that may change runtime behavior (e.g.: parser or VM flags) are not appropriate for this list.
|
2023-02-17 16:53:37 +02:00
|
|
|
static const char* const kList[] = {
|
2024-04-19 14:04:30 -07:00
|
|
|
"LuauInstantiateInSubtyping", // requires some fixes to lua-apps code
|
|
|
|
"LuauFixIndexerSubtypingOrdering", // requires some small fixes to lua-apps code since this fixes a false negative
|
2025-01-10 09:13:13 -08:00
|
|
|
"StudioReportLuauAny2", // takes telemetry data for usage of any types
|
2025-02-07 13:04:46 -08:00
|
|
|
"LuauTableCloneClonesType3", // requires fixes in lua-apps code, terrifyingly
|
2024-08-30 12:28:44 -07:00
|
|
|
"LuauSolverV2",
|
2022-09-01 16:00:14 -07:00
|
|
|
// makes sure we always have at least one entry
|
|
|
|
nullptr,
|
2022-07-21 13:36:41 -07:00
|
|
|
};
|
|
|
|
|
2022-08-04 14:27:28 -07:00
|
|
|
for (const char* item : kList)
|
2022-07-21 13:36:41 -07:00
|
|
|
if (item && strcmp(item, flag) == 0)
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-08-04 14:27:28 -07:00
|
|
|
} // namespace Luau
|