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

Optimize constant/global validation #351

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Mar 26, 2021

No description provided.

@@ -318,13 +318,29 @@ def update_builder(ancestor_builder:, paths:)
def type_names(paths:, env:)
env.declarations.each.with_object(Set[]) do |decl, set|
if decl.location
if paths.include?(decl.location.buffer.name)
if paths.include?(Pathname(decl.location.buffer.name))
Copy link
Owner Author

Choose a reason for hiding this comment

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

🐛

end
end

validator.validate_const()
validator.validate_global()
const_decls = service.const_decls(paths: Set[path], env: service.latest_env)
Copy link
Owner Author

Choose a reason for hiding this comment

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

Validate constants and globals only if the declaration is in path.

@soutaro soutaro merged commit be76904 into master Mar 26, 2021
@soutaro soutaro deleted the optimize-const-global-validation branch March 26, 2021 09:42
@soutaro soutaro linked an issue Mar 26, 2021 that may be closed by this pull request
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.

LSP responsiveness improvement
1 participant