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

[276] Refactor API #277

Merged
merged 6 commits into from
Feb 28, 2024
Merged

[276] Refactor API #277

merged 6 commits into from
Feb 28, 2024

Conversation

ghentschke
Copy link
Contributor

to provide a stable API with v2.0.0

to provide a stable API with v2.0.0
Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

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

Approve - but there seems to be compilation failures that need resolving first.

I will rely on @ruspl-afed to do a review too as he normally has deeper looks at specifics of the APIs that I do.

Export-Package: org.eclipse.cdt.lsp,
org.eclipse.cdt.lsp.config;x-friends:="org.eclipse.cdt.lsp.clangd",
Copy link
Member

Choose a reason for hiding this comment

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

Should this have internal in the name if it is only intended to be used by friends? Or do you have 3 levels:

  • Public API: no internal in names and no x-friends/x-internal
  • Internal API (between bundles): no internal in names, and x-friends/x-internal
  • complete non-API: not included in Export-Package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Public API: no internal in names and no x-friends/x-internal
Internal API (between bundles): no internal in names, and x-friends/x-internal
complete non-API: not included in Export-Package

yes, that's what I had in mind

Copy link
Member

Choose a reason for hiding this comment

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

internal segment in names comes from this [relatively unclear] convention

@ghentschke
Copy link
Contributor Author

I fixed the unit tests. Please review @ruspl-afed

Copy link
Member

@ruspl-afed ruspl-afed left a comment

Choose a reason for hiding this comment

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

I have no strong objections. However, I would prefer yet another iteration before API publishing.

Export-Package: org.eclipse.cdt.lsp,
org.eclipse.cdt.lsp.config;x-friends:="org.eclipse.cdt.lsp.clangd",
Copy link
Member

Choose a reason for hiding this comment

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

internal segment in names comes from this [relatively unclear] convention

Copy link
Member

Choose a reason for hiding this comment

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

Questionable type even for component-internal API. It exposes a lot of needless UI API. Let's focus on what is really needed from it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It exposes a lot of needless UI API

Yes ,we can do that in the next API refactor iteration

@@ -9,7 +9,7 @@
* Contributors:
* See git history
*******************************************************************************/
package org.eclipse.cdt.lsp;
package org.eclipse.cdt.lsp.util;
Copy link
Member

Choose a reason for hiding this comment

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

Traditional, but weak name for package and type, I'm sure we can have something better here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, next API refactor iteration

@@ -11,14 +11,12 @@
* Alexander Fedorov (ArSysOp) - rework to OSGi component
*******************************************************************************/

package org.eclipse.cdt.lsp.internal;
Copy link
Member

@ruspl-afed ruspl-afed Feb 26, 2024

Choose a reason for hiding this comment

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

component implementation should never be an API, even if we are talking about internal "cdt-lsp" scope

@ruspl-afed
Copy link
Member

@ghentschke , what is your plan regarding this one? My suggestion is to merge it "as is" and then have another iteration of API refinement.

@ghentschke
Copy link
Contributor Author

what is your plan regarding this one? My suggestion is to merge it "as is" and then have another iteration of API refinement

I am currently working on another issue but I wanted to catch up some of your comments which can be fixed fast. I think I can do that today.

@ghentschke
Copy link
Contributor Author

I would at least fix the build error in the test

@ghentschke ghentschke merged commit e45bfa7 into eclipse-cdt:master Feb 28, 2024
3 checks passed
@ghentschke ghentschke deleted the refactor-API branch February 28, 2024 14:35
@ghentschke
Copy link
Contributor Author

@ruspl-afed or @jonahgraham Do have na idea why the master cannot be build? It claims that the maven version must be 3.9.0.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-source-plugin:4.0.6:plugin-source (plugin-source) on project org.eclipse.cdt.lsp.root: The plugin org.eclipse.tycho:tycho-source-plugin:4.0.6 requires Maven version 3.9.0 -> [Help 1]

But the maven version has already been updated here:

maven-version: 3.9.6

@akurtakov
Copy link

This is controlled by https://github.com/eclipse-cdt/cdt-lsp/blob/master/Jenkinsfile and not the GHA file. Unfortunately, I have no idea how your docker image is defined to be able to help you more. In not that custom environments smth like https://github.com/eclipse-platform/eclipse.platform.ui/blob/04dd9a1bf255b0af610082a38d79ccd4fa861084/Jenkinsfile#L11 is enough.

@akurtakov
Copy link

Probably changing the mvn executable used to the one that cdt uses https://github.com/eclipse-cdt/cdt/blob/95fe4d87010b1446741bedd8818bea3252ebc8be/Jenkinsfile#L40C23-L40C61 should do the trick.

@jonahgraham
Copy link
Member

Sorry - @ghentschke I forgot that I had updated only main CDT Jenkinsfile and not the cdt-lsp one. PR incoming.

@ghentschke
Copy link
Contributor Author

@akurtakov Thank you for the hints!

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.

4 participants