-
Notifications
You must be signed in to change notification settings - Fork 145
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
Would it be possible to rewrite Xtend code in Java? #740
Comments
I believe our most recent release got rid of this dependency for the runtime components (see #494). If there are still some unnecessarily complicated dependencies can you be explicit about them. I.e. Which dependency in which bundle is causing problems As for removing xtend source from LSP4J that is unlikely as we depend on the code generation facilities |
No, I am talking about build dependencies. In Fedora everything has to be built from source and has to be properly packaged. |
The Xtend gradle plugin does not depend on tycho |
I forgot to mention, in Fedora we don't have Gradle so all Java packages requiring Gradle are slightly modified to use Maven. |
Again Xtend uses Xtext and Xtext uses eclipse (e.g. eclipse.core.runtime, org.eclipse.jdt) and these are built using maven tycho too. |
Can you generate the java files from the xtend files and contribute that as a patch to your build package? In the past we actually had the generated java files in our git repo. |
Gson is not a problem, we have it.
I was thinking about that, it looks like Xtend it almost identical to Java, but i don't know how to safely transpile the code. |
You can’t |
Do a gradle build normally and make a patch with the contents of the *-gen folders. |
You can't patch-in code you generated elsewhere... |
Wonder how fedora builds other eclipse stuff eg |
PS the sources bundles in Maven have the java files in them - e.g. https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j/0.21.0/org.eclipse.lsp4j-0.21.0-sources.jar |
|
Can you help me understand why you build everything from source? I'd expect the resulting Jar files to produce different checksums than the released bits on Maven Central would produce. The signing information would be different, too. What is the goal of that exercise? |
That is the Fedora policy, we build everything from source so that we can patch it. So, if I want to add XML language server, all its dependencies must be available as Fedora packages. I looked into Tyxho and we did use to have it in Fedora (but was orphaned later). Nevertheless the package looks complex https://src.fedoraproject.org/rpms/tycho/blob/f34/f/tycho.spec. So, I need a minimal dependency chain which leads to having successfully compiled XML language server. What exactly does Xtend give you that isn't present in Java? |
LSP4J uses https://www.eclipse.org/xtend/documentation/204_activeannotations.html to generate code from Java interfaces. This greatly reduces the maintenance effort and guarantees consistency within the code base. It would be possible to use different code generation techniques, but it'd require a major rewrite which is out-of-scope for the time being. See the first response in this thread:
|
After attempting several more builds I came to a conclusion that if we want XML-LS in Fedora, we would have to revive a lot of Eclipse packages going as far as to Eclipse JDT which is possible but someone would have to maintain it. As for the original question, the answer is clearly "no". |
I wanted to package https://github.com/eclipse/lemminx which depends on this library in Fedora.
This library depends on xtend plugin, which itself depends on Tycho. Tycho depends on itself.
This is all a dependency hell that could be simply avoided if this project got rid of the rather exotic language.
Would this be possible?
The text was updated successfully, but these errors were encountered: