You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
declareclassWidgetstate: {string:function(string, Widget)}
end
If I copy paste the above text into a type definition file and reload the lsp, luau-lsp starts leaking memory at around 100MB+ per second until the system runs out of ram.
The culprit seems to be {string: function(string, Widget)}. The syntax is probably wrong. If I use (string, Widget) -> nil instead, there's no leak.
But just wanted to report the leak anyway, as someone else might fumble into this issue.
I moved this to Luau since I can repro it in Luau's codebase with
TEST_CASE_FIXTURE(Fixture, "test")
{
LoadDefinitionFileResult result = loadDefinition(R"( declare class Widget state: {string: function(string, Widget)} end)");
}
The text was updated successfully, but these errors were encountered:
Thanks for the report; digging in a bit I think what's happening is that when we attempt to parse this type, we error, and the error recovery doesn't move us past the error, so we just continually parse properties until Luau gets ... OOM killed I suppose.
Originally reported by @coderedart in JohnnyMorganz/luau-lsp#756
If I copy paste the above text into a type definition file and reload the lsp, luau-lsp starts leaking memory at around 100MB+ per second until the system runs out of ram.
The culprit seems to be {string: function(string, Widget)}. The syntax is probably wrong. If I use (string, Widget) -> nil instead, there's no leak.
But just wanted to report the leak anyway, as someone else might fumble into this issue.
I moved this to Luau since I can repro it in Luau's codebase with
The text was updated successfully, but these errors were encountered: