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

Update to the latest direct-from-maven dependencies #366

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

merks
Copy link
Contributor

@merks merks commented Aug 29, 2024

No description provided.

@merks
Copy link
Contributor Author

merks commented Aug 29, 2024

See also eclipse-cdt/cdt#894 which similar changes.

@ruspl-afed
Copy link
Member

@merks do you think it may be better to switch from direct maven to Orbit dependencies here? What are the latest trends at the moment?

@merks
Copy link
Contributor Author

merks commented Aug 29, 2024

The question is a little bit politically loaded so I will tread carefully so as not to offend alternative valid points of view on the subject.

  1. On the one hand, projects have the autonomy and the ability to manage their dependencies directly themselves with no central authority with whom to negotiate and hence no gate keeper who might delay adding or updating dependencies.
  2. On the other hand, Orbit is now very well-managed and typically updates dependencies within 24 hours of them becoming available.

Neutral points that apply to both cases:

  • Adding a dependency involves adding the coordinates to a maven target location in a *.target.
  • Each dependency must be PGP signed.

For dependencies that need BND instructions, we have a significant problem if different projects wrap the same artifact in different ways while producing the same bundle symbolic name. Even if different BSNs are produced, we end up with "hidden" duplicates that will presumably export the same Java packages quite likely leading to wiring problems in a composed end result like SimRel. Hence the rule that only direct-from-maven dependencies that are directly available as OSGi bundles are permitted in SimRel.

The significant question is, how best to keep dependencies up-to-date?

  1. Tycho is currently fine tuning a dependabot-like mechanism for updating the dependencies in a *.target file. It appears that will work quite well, based on experiments in the Platform.
  2. Orbit updates dependencies via generators and provides the service of generating reports for SimRel projects that are managing their own dependencies directly.

I will leave it up to projects to decide what is best for them. My personal bias is really not relevant.

@ruspl-afed
Copy link
Member

Thank you for such an exhaustive answer @merks
Following you, I would hide my personal preferences and leave it to @jonahgraham and @ghentschke to decide.

@laeubi
Copy link

laeubi commented Aug 29, 2024

The Tycho Target update can handle both, maven and P2 locations. Beside that, the most important part is how dependencies are referenced so they should

  1. not be contained in features directly
  2. not be required by strict version ranges

then the actual used version to build is not that important and P2 can simply kick out older versions itself.

@merks
Copy link
Contributor Author

merks commented Aug 29, 2024

FYI, in this case category.xml included a dependency bundle with an exact version. I think that wasn't necessary...

@ghentschke
Copy link
Contributor

To be honest, I am not very familiar with the dependency management. Since the cdt-lsp project is very close to cdt, we should discuss this issue with @jonahgraham how to handle that in the future in cdt.

Copy link
Contributor

@ghentschke ghentschke left a comment

Choose a reason for hiding this comment

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

LGTM

@ghentschke ghentschke merged commit 6f1d04a into eclipse-cdt:master Sep 13, 2024
2 checks passed
@ghentschke
Copy link
Contributor

@merks Thank you!

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