Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

analyzer: rework path handling to simplify and reduce load #86

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Apr 6, 2024

The PR reworks path handling by using a paths child struct on the LanguageServer. vpaths will be set up during the language server setup process and become easily accessible throughout the session.

This helps to remove things like calling the compiler_path() function and calculating the vexe path on e.g. every request to a tool (like formatting on save). The same goes for repetitive calls of vmodules_root() and vlib_root(). Instead, the paths are just available via ls.paths.vexe ls.paths.vlib_root ls.paths.vmodules_root.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman spytheman merged commit 3cb964b into vlang:main Apr 9, 2024
12 checks passed
@Lycs-D Lycs-D mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants