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

Remove Xtext dependencies from Sprotty #93

Open
glatuske opened this issue Feb 29, 2024 · 5 comments
Open

Remove Xtext dependencies from Sprotty #93

glatuske opened this issue Feb 29, 2024 · 5 comments

Comments

@glatuske
Copy link
Contributor

glatuske commented Feb 29, 2024

The bundle org.eclipse.sprotty has an import package on Xtext but no Java class is using it. This import should be removed.

I guess this dependency comes via Xtend but is build time only.

@sailingKieler
Copy link
Contributor

sailingKieler commented Mar 1, 2024

The bundle org.eclipse.sprotty has an import package on Xtext but no Java class is using it. This import should be removed.

I guess this dependency comes via Xtend but is build time only.

@glatuske the sprotty protocol datatypes are specified in Xtend using Xtend's active annotations, which are declared in org.eclipse.xtend.lib.macro (transitively pulled via org.eclipse.xtend.lib). Their retention policy is unspecified, i.e. CLASS by default, so they're not available at runtime, and maybe their declaration is not required at runtime.

However, the setters and getters in the datatype use (are generated with) the annotation org.eclipse.xtext.xbase.lib.Pure that as retention policy RUNTIME.

Consequence: In order to get rid of that dependencies we would have to replace the Xtend-based definitions by counterparts in Java, which is not super tempting.

In which way are those dependencies problematic for you?

@sailingKieler
Copy link
Contributor

One more finding:
It's actually the java package org.eclipse.xtext.xtend2.lib that is requested and that is exported by bundle org.eclipse.xtext.xbase.lib.

So on eclipse bundle/maven artifact level it's "just" org.eclipse.xtext.xbase.lib that is required as dependency.
I was able to rid of org.eclipse.xtext.xtend2.lib package import via a minor change (in IdCache), getting rid of the dependency on org.eclipse.xtext.xbase.lib will by a major refactoring, I guess.

@glatuske
Copy link
Contributor Author

glatuske commented Mar 1, 2024

@sailingKieler I have created my request because of the combination of different Xtext versions (and Google Guice & Guava) with @kieler is quite tricky.
We will give it a try to update KLighD to use Guice 6.0 as well. I'll come back when I know more.

@sailingKieler
Copy link
Contributor

sailingKieler commented Mar 1, 2024

Which dependency version constraint do you have there? (I'm currently not up-to-date on that).
What we might try is to relax the version constraint on xbase.lib here, as I don't expect significant changes among the recent versions.

@glatuske
Copy link
Contributor Author

glatuske commented Mar 1, 2024

It would help us, if the minimum version would be set to 2.31 (or below).

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

No branches or pull requests

2 participants