ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.54k stars 733 forks source link

[Bug]: Language Server crashes when opening a project with a large number of Ballerina types #42612

Open nipunayf opened 3 weeks ago

nipunayf commented 3 weeks ago

Description

The LS crashes when trying to open the Ballerina Zuora module in VS Code. Although the server crashes without showing any error logs, it appears to be an OOM leading to its shutdown.

The program can be successfully built without encountering any issues. However, the LS crashes in the same for a new package that relies on the locally published Zuora module as a dependency.

Steps to Reproduce

Clone the following project and open the ballerina directory in VSCode.

https://github.com/ayeshLK/module-ballerinax-zuora/tree/openapi-spec

Affected Version(s)

Ballerina 2201.8.6 (Swan Lake Update 8)

OS, DB, other environment details and versions

OS: macOS 14.4.1 23E224 JDK: openjdk 17.0.8 2023-07-1

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

nipunayf commented 3 weeks ago

The server does not crash when the types.bal(https://github.com/ayeshLK/module-ballerinax-zuora/blob/openapi-spec/ballerina/types.bal) file is divided into four separate files, which can be used as a workaround for now.