Closed robmck1995 closed 1 month ago
The function initialize_app_state
in lsproxy/src/lib.rs
(lines 68-76) initializes the LspManager
but does not handle potential errors from start_langservers
. If start_langservers
fails, it could lead to unhandled exceptions or incorrect application state.
In lsproxy/src/lib.rs
, the check_mount_dir
function (lines 28-30) is called in run_server
(lines 80-83) to ensure the mount directory exists. However, if the directory is not mounted, the error message is printed, but the server initialization continues. This could lead to runtime errors if the directory is required for server operations.
Description
initialize_app_state
andrun_server
functions to streamline server initialization.Cargo.toml
to configure the library.Changes walkthrough
main.rs
Refactor main to utilize library functions
lsproxy/src/main.rs
initialize_app_state
andrun_server
.lib.rs
Create library module for server setup
lsproxy/src/lib.rs
initialize_app_state
andrun_server
functions.mod.rs
Add and export handler modules
lsproxy/src/handlers/mod.rs
api_types.rs
Update imports in api_types module
lsproxy/src/api_types.rs - Updated imports for `lsp_types`.
Cargo.toml
Configure library in Cargo.toml
lsproxy/Cargo.toml - Added library configuration.
💡 Usage Guide
### Checking Your Pull Request Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later. ### Talking to CodeAnt AI Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask: This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code. ### Retrigger review Ask CodeAnt AI to review the PR again, by typing: ### Check Your Repository Health To analyze the health of your code repository, visit our dashboard at [app.codeant.ai](https://app.codeant.ai). This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.