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

jdt.compiler.(apt|tool) gone #2134

Closed
cdietrich opened this issue Jan 13, 2023 · 21 comments
Closed

jdt.compiler.(apt|tool) gone #2134

cdietrich opened this issue Jan 13, 2023 · 21 comments
Assignees
Labels
Milestone

Comments

@cdietrich
Copy link
Contributor

cdietrich commented Jan 13, 2023

jdt.compiler.(apt|tool) gone seems to be removed from jdt
@iloveeclipse @szarnekow do you know if this is intentional?
what is the replacement?

eclipse-jdt/eclipse.jdt.core@457e222
of course it will be painful to make this work with backwards compatibility

@cdietrich cdietrich added this to the Release_2.30 milestone Jan 13, 2023
@cdietrich
Copy link
Contributor Author

cc @LorenzoBettini this breaks the changes with eclipse/xtext-maven#146

@cdietrich
Copy link
Contributor Author

the new bundle also seems not to be a fragment anymore

@cdietrich
Copy link
Contributor Author

cdietrich commented Jan 13, 2023

only explicit usage in maven/gradle (here we still use old version) and wizard,
the question is if there is any eclipse code that relys on the fragments present,
@szarnekow do you know?

@LorenzoBettini
Copy link
Contributor

IIRC, It was announced in the cross project dev mailing list as the result of refactoring of ecj. Probably for backward compatibility we could add jdt.feature to the tp? Or maybe those fragments are not needed anymore also for order tp now that we have pinned versions?

@iloveeclipse
Copy link
Contributor

@cdietrich
Copy link
Contributor Author

so to be on the safe side we need to add a dependency to
org.eclipse.jdt.core.compiler.batch
where we have a dependency to jdt.core

@cdietrich
Copy link
Contributor Author

find . -name "MANIFEST.MF"| xargs grep org.eclipse.jdt.core | grep -v /build/ | grep -v /target/
./xtext-eclipse/org.eclipse.xtext.ui.shared/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.purexbase.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.xbase.ui.testing/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.xtext.ui.examples/projects/fowlerdsl/org.eclipse.xtext.example.fowlerdsl.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.xtext.ui.examples/projects/fowlerdsl/org.eclipse.xtext.example.fowlerdsl.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core,
./xtext-eclipse/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.xtext.ui.examples/projects/domainmodel/org.eclipse.xtext.example.domainmodel.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.xtext.ui.examples/projects/homeautomation/org.eclipse.xtext.example.homeautomation.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.xbase.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.ui.testing/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.common.types.shared/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.xbase.junit/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.xtext.ui.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.purexbase.eclipse.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.m2e/META-INF/MANIFEST.MF: org.eclipse.jdt.core;resolution:=optional
./xtext-eclipse/org.eclipse.xtext.xbase.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.xbase.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core.manipulation;bundle-version="1.16.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.common.types.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.common.types.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core.manipulation;bundle-version="1.16.0",
./xtext-eclipse/org.eclipse.xtext.builder.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional,
./xtext-eclipse/org.eclipse.xtext.builder/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.xtext.ui/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-eclipse/org.eclipse.xtext.junit4/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-eclipse/org.eclipse.xtext.common.types.eclipse.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-xtend/org.eclipse.xtend.ide/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-xtend/org.eclipse.xtend.ide/META-INF/MANIFEST.MF: org.eclipse.jdt.core.manipulation;bundle-version="1.16.0";resolution:=optional,
./xtext-xtend/org.eclipse.xtend.ide.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-xtend/org.eclipse.xtend.ide.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core.manipulation;bundle-version="1.16.0",
./xtext-xtend/org.eclipse.xtend.core/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional;x-installation:=greedy,
./xtext-xtend/org.eclipse.xtend.standalone/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";visibility:=reexport,
./xtext-xtend/org.eclipse.xtend.core.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-xtend/org.eclipse.xtend.examples/projects/xtend-annotation-examples/META-INF/MANIFEST.MF: org.eclipse.jdt.core,
./xtext-xtend/org.eclipse.xtend.performance.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-extras/org.eclipse.xtext.xbase.testing/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";visibility:=reexport,
./xtext-extras/org.eclipse.xtext.common.types.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-extras/org.eclipse.xtext.java/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-extras/org.eclipse.xtext.builder.standalone/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional,
./xtext-extras/org.eclipse.xtext.generator/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional
./xtext-extras/org.eclipse.xtext.purexbase.tests/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0",
./xtext-core/org.eclipse.xtext.xtext.generator/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.29.0";resolution:=optional

@cdietrich
Copy link
Contributor Author

i checked, jdt.compiler.core has a dependency to jdt.compiler.batch
thus is assume we can simply remove the tool and apt stuff and would be fine
Bildschirmfoto 2023-01-14 um 09 15 00

@cdietrich
Copy link
Contributor Author

@LorenzoBettini could you try that with your usecase for eclipse/xtext-maven#146

@iloveeclipse
Copy link
Contributor

i checked, jdt.compiler.core has a dependency to jdt.compiler.batch thus is assume we can simply remove the tool and apt stuff and would be fine

Have you actually read the notes?

All of ECJ packages are re-exported by org.eclipse.jdt.core, therefore from OSGI point of view, all 3rd party code that used some compiler related API from org.eclipse.jdt.core doesn't require any change.

So if some target definition, launch configuration or build file referenced the two fragments, these references can and should be removed now.

@cdietrich
Copy link
Contributor Author

cdietrich commented Jan 14, 2023

i was confused by the second "problem" that point do "ant" like environments

cdietrich added a commit to xtext/xtext-reference-projects that referenced this issue Jan 14, 2023
@iloveeclipse
Copy link
Contributor

Do you have non OSGI based use case where Xtext used in a plain Java application (means, no dependencies resolving via manifests through OSGI container)? In that case you need to add batch compiler bundle to the classpath.

@cdietrich
Copy link
Contributor Author

only if users do not use maven or gradle or tycho to provide the classpath
like calling xtend compiler from ant as your company does @iloveeclipse

@cdietrich
Copy link
Contributor Author

@iloveeclipse @merks can you tell / do you know if there are is a maven snapshot repo available for jdt and platform meanwhile?

@iloveeclipse
Copy link
Contributor

We do use xtext from OSGI context, and that's is a different problem (too much of context) :)
There was only one place we had where we used jdt core for Java parsing from ant - and that was the only place where extra batch compiler needed now.

@merks
Copy link
Contributor

merks commented Jan 14, 2023

@iloveeclipse
Copy link
Contributor

This JDT stuff indeed looks very new:

Note, it still has ecj and doesn't have compiler batch. Also note, ecj is the compiler batch bundle.

@merks
Copy link
Contributor

merks commented Jan 14, 2023

What is there is as expected and is correct...

There is this mapping rule:

image

That produces the expected ecj artifact name:

image

That artifact has the expected symbolic name:

image

And eventually, when release, it will end up here as before:

https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/

So what we see in this snapshot repository is what we will see after it's published to Maven central...

@cdietrich
Copy link
Contributor Author

=> we should do a branch where we update to latest platform
and also adds

<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.33.0-SNAPSHOT</version>
</dependency>

to the dev bom.

  • remove all maven/gradle refs to compiler tool+apt

cdietrich added a commit to eclipse/xtext-lib that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-web that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Jan 16, 2023
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 17, 2023
[eclipse-xtext/xtext#2134] remove dependency to obsolte jdt.compiler.(tool|apt)
cdietrich added a commit to xtext/xtext-reference-projects that referenced this issue Jan 17, 2023
@cdietrich
Copy link
Contributor Author

@cdietrich cdietrich self-assigned this Jan 18, 2023
@cdietrich
Copy link
Contributor Author

have to wait for testing until the deploy issue consuming from gradle is resolved or 4.27 is released

@cdietrich cdietrich modified the milestones: Release_2.30, Release_2.31 Feb 17, 2023
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Mar 14, 2023
cdietrich added a commit to eclipse/xtext-core that referenced this issue Mar 14, 2023
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Mar 14, 2023
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Mar 14, 2023
cdietrich added a commit to eclipse/xtext-web that referenced this issue Mar 14, 2023
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Mar 15, 2023
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Mar 15, 2023
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Mar 15, 2023
@cdietrich cdietrich modified the milestones: Release_2.31, Release_2.32 May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants