-
Notifications
You must be signed in to change notification settings - Fork 12
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
[405] fix broken ClangdOptionsDefault #406
[405] fix broken ClangdOptionsDefault #406
Conversation
I am not sure if we have to extend all other public interfaces well (e.g. |
That would require every time we expand the interface for new clangd settings entry a lot of new files... :-( |
I have a question: why don't we add new method with default implementation to the existing interface? |
I haven't been reviewing or paying particularly close attention to how the preferences are handled, but because @ruspl-afed mentioned new methods in interfaces I want to point out CDT's policy on this https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md#new-default-methods-in-interfaces which is more permissive than API tools allows by default. PS Along with CDT 12 being a major new version, we could also do a major new version for CDT-LSP too (3.0) if it simplifies our collective lives. |
Do you mean to |
I think according to @jonahgraham reply I think we comply with the policy when we add a new default method to the default boolean logToConsole() {
return false;
} |
Yes, that looks correct. And add a commented filter from the quick fix on the problem that tells you to update major version. Here is an example of what I mean in case you aren't familiar: This will create a new file |
Thank you @jonahgraham for highlighting this opportunity for us. @ghentschke do you think we can have less pain in the future if we will declare Or may be we can even use this opportunity (CDT 12.0) to adapt option management design to the fact that every interface change is in fact the major one, because it seems that we need to avoid any aggregating interfaces. |
I'm actively not weighing in on @ruspl-afed questions from #406 (comment) because I simply don't have anywhere the experience or use case knowledge to know what the right way forward is. Please let me know if you need me to become more informed on this and weigh in. |
instead of creating *2 naming schemes for Interfaces
That was my last approach before we decided to extend ClangdOptions.
So with every major release the API can be modified? |
Hm, my IDE does not show API errors. How can I enable them? |
I have a hope we can solve this with @ghentschke without bothering the big guys. |
See https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md#Using-API-Tooling - but it just occurred to me that cdt-baseline.target should have CDT-LSP's latest release and features added to it, or else you won't get errors about CDT-LSP changes. I will do a PR for that in a moment on CDT and tag it here. |
See/follow eclipse-cdt/cdt#1066 - I haven't finished testing it is correct, but will do so soon. |
It would be great if we can have time this week to discuss pros & cons. The current solution with a major version update is workable, but something is wrong if we need to do this for every added option..
I believe yes |
thank you for the fix @jonahgraham This explains the need to re-publish existing interface for the new version that we discussed here @ghentschke |
Finally it got the API filter working. Thank you @jonahgraham !! Any open objections for now, besides the open question how to handle option changes in the future? |
* | ||
* @since 2.2 | ||
*/ | ||
PreferenceMetadata<Boolean> logToConsole(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There needs to be a default to be acceptable by the CDT policy.
(I didn't compile/format this)
PreferenceMetadata<Boolean> logToConsole(); | |
default PreferenceMetadata<Boolean> logToConsole() { return false; } ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - the build failed and I didn't look at why.
I had a hunch about the problem, so I decided to have a look:
This happens because you changed the signature the problem ID in the api filters needs to be updated. This is what it looks like in the UI: What it is saying is the filter you added initially (before it was default) is now unneeded (the warning) + the error about the missing version bump. I have pushed a fix for the problem and hopefully that will build cleanly. |
/request-license-review |
License review requests:
After all reviews have concluded, re-run the license-vetting check from the Github Actions web-interface to update its status. Workflow run (with attached summary files): |
/request-license-review |
License review requests:
After all reviews have concluded, re-run the license-vetting check from the Github Actions web-interface to update its status. Workflow run (with attached summary files): |
@jonahgraham Thank you! |
Hm, I have no idea why the licence check still fails :-/ |
Possibly due to the significant instability in IT infra at Eclipse this week, see past incidents on https://www.eclipsestatus.io/ . There has been an outage nearly everyday this week. The HEAD of the main branch passed license check so nothing more to do now. |
Yes, I've triggered a rebuild several times :-/ |
1 similar comment
Yes, I've triggered a rebuild several times :-/ |
Thanks for doing that. I see you are also suffering some instability with GitHub (dup comments above). I have been having GitHub problems all morning so far too and also had dup comments after GitHub initially tells me save of comment failed. |
fixes #405