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

Introduce a limit to outline tree size #194

Merged

Conversation

slavek-kucera
Copy link
Contributor

No description provided.

@slavek-kucera slavek-kucera marked this pull request as ready for review October 14, 2021 12:16
@zimlu02 zimlu02 added this to the 0.15.0 milestone Oct 14, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

94.3% 94.3% Coverage
0.0% 0.0% Duplication

@@ -320,7 +320,8 @@ void feature_language_features::document_symbol(const json& id, const json& para
{
auto document_uri = params["textDocument"]["uri"].get<std::string>();

auto symbol_list = ws_mngr_.document_symbol(uri_to_path(document_uri).c_str());
const auto limit = 5000LL;
auto symbol_list = ws_mngr_.document_symbol(uri_to_path(document_uri).c_str(), limit);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to make the limit configurable by adding it to the user configuration and then using the configuration changed notification (which is already implemented). Might be even easier, since no edits to workspace_manager would be required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the user configurable option - given how poorly vscode behaves when too many nodes are reported, I think we would just end up giving users an option that could only cause problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the workspace_manager changes, that could be done, but lsp_context and workspace share the interface, so if there is to be a parameter on the document_symbol function, it must be present on the workspace version as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I would prefer that workspace would not implement the interface and put the limit into lib_config. But then lib_config wouldn't represent only user-configurable options.

I guess I am fine with both versions, then.

@slavek-kucera slavek-kucera merged commit 5724f79 into eclipse-che4z:development Oct 19, 2021
@slavek-kucera slavek-kucera deleted the fix_outline_limit branch October 19, 2021 15:02
@github-actions
Copy link

github-actions bot commented Nov 3, 2021

🎉 This PR is included in version 0.15.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Nov 8, 2021

🎉 This PR is included in version 0.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants