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

Build against jdt-core-incubator #2963

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

akurtakov
Copy link
Contributor

@akurtakov akurtakov commented Nov 17, 2023

Changes to target platform are quite big as:

  • jdt feature can't be used

@akurtakov akurtakov marked this pull request as draft November 17, 2023 12:15
@akurtakov
Copy link
Contributor Author

@rgrunber @fbricon This is an all in one commit for testing purposes . If there is an agreement I will split into multiple reviewable parts to we land them biggest part of it in master even without switching to use jdt-core-incubator for now.

@akurtakov akurtakov force-pushed the jdt-incubator-releng branch 2 times, most recently from 2dfb9f3 to 7687683 Compare November 17, 2023 12:53
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

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

Suppose there is a bug/feature that lands in the latest JDT Core upstream. Normally we would have picked it up by updating the qualifier portion of https://download.eclipse.org/eclipse/updates/4.30-I-builds/I20231030-1800/. How would we do this ? Is the latest incubator build guaranteed to match the latest version of jdt.core + incubation changes ? What if we want specifically to build against an older I-build and not the latest ?

@akurtakov
Copy link
Contributor Author

Suppose there is a bug/feature that lands in the latest JDT Core upstream. Normally we would have picked it up by updating the qualifier portion of https://download.eclipse.org/eclipse/updates/4.30-I-builds/I20231030-1800/. How would we do this ?

Same way as till now - update the qualifier in the target platform. That would give you all updates in the I-build minus the jdt.core changes.

Is the latest incubator build guaranteed to match the latest version of jdt.core + incubation changes ?

No such guarantee. One has to rebase jdt-core-incubator:devel on top of https://github.com/eclipse-jdt/eclipse.jdt.core and push. After the push and successful build jdt-core-incubator p2 repo will contain latest version of jdt.core + incubation changes. I can imagine GH action to auto rebase on top of jdt.core master when clean rebase could happen, if it couldn't manual rebase would be needed.

What if we want specifically to build against an older I-build and not the latest ?

You can use older I-builds by changing the target platform but jdt-core-incubator will contain changes unless you rebase it to some commit too.

@akurtakov akurtakov force-pushed the jdt-incubator-releng branch 3 times, most recently from d23af22 to edc0211 Compare November 21, 2023 20:17
@laeubi
Copy link

laeubi commented Nov 29, 2023

@akurtakov have you considered including the fragment as a maven dependency instead?

@laeubi
Copy link

laeubi commented Nov 29, 2023

by the way PDE now supports resolve between locations.

@akurtakov
Copy link
Contributor Author

@akurtakov have you considered including the fragment as a maven dependency instead?

I would like to have it in sync with o.e.jdt.launching and same version as in the I-build. Publishing to Maven Central happens for releases only.

@akurtakov akurtakov force-pushed the jdt-incubator-releng branch 2 times, most recently from 5918b53 to c1ef01b Compare December 13, 2023 19:55
@akurtakov akurtakov force-pushed the jdt-incubator-releng branch from c1ef01b to c36120e Compare January 9, 2024 20:45
@laeubi
Copy link

laeubi commented Jan 10, 2024

  • thus jdt.launching.macos have to be included manually

By the way this should be fixed if this is merged:

@laeubi
Copy link

laeubi commented Jan 10, 2024

deps have to be moved to Maven as slicer can't resolve between locations

This should be fully supported by latest eclipse i-build now

@akurtakov
Copy link
Contributor Author

deps have to be moved to Maven as slicer can't resolve between locations

This should be fully supported by latest eclipse i-build now

What about Tycho?

@laeubi
Copy link

laeubi commented Jan 10, 2024

deps have to be moved to Maven as slicer can't resolve between locations

This should be fully supported by latest eclipse i-build now

What about Tycho?

For Tycho this has worked from day 1 ...

@akurtakov akurtakov force-pushed the jdt-incubator-releng branch 2 times, most recently from dbcfd91 to 2ba7d7a Compare January 11, 2024 16:38
@akurtakov akurtakov force-pushed the jdt-incubator-releng branch from 2ba7d7a to d4b42f7 Compare January 12, 2024 08:13
@akurtakov
Copy link
Contributor Author

@rgrunber this looks in good shape now. Is the failing test unstable?

@rgrunber
Copy link
Contributor

retest this please.

Yes, that one has failed in the past also.

@akurtakov akurtakov marked this pull request as ready for review January 12, 2024 15:49
@akurtakov
Copy link
Contributor Author

As soon as we have the first PR adding content that is not in jdt.core master this one should be merged. Aka make the incubatore effective.

@akurtakov akurtakov force-pushed the jdt-incubator-releng branch from d4b42f7 to ebae67b Compare January 24, 2024 13:59
<unit id="org.mockito.mockito-core" version="0.0.0"/>
<unit id="org.apache.commons.commons-io" version="0.0.0"/>
<unit id="org.eclipse.jdt.apt.pluggable.core" version="0.0.0" />
Copy link
Contributor

@rgrunber rgrunber Jan 24, 2024

Choose a reason for hiding this comment

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

Is there a reason why jdt.apt.pluggable.core isn't being built by the incubator at https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator/blob/develop/repository/category.xml ? Either way it's probably a good idea to make sure the incubator produces a snapshot build that matches the I-build from eclipse/updates.

Update: Might as well also remove the space between "0.0.0" and /> so it doesn't get autocorrected when loaded.

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 build it but doesn't publish it . Do you want to publish it to downloads too? As I don't see any changes needed for any apt bundles I would even say it might be better to even not publish jdt.apt.core but use it from the I-build repo.

@rgrunber
Copy link
Contributor

rgrunber commented Jan 24, 2024

One nice side effect is this should reduce the target platform from ~344MB to ~244MB due to unnecessary artifacts that probably got dragged in due to features including too much.

result.addAll(changeManager.getAllChanges());
String renamedCUName = JavaModelUtil.getRenamedCUName(type.getCompilationUnit(), getNewElementName());
result.add(new RenameCompilationUnitChange(type.getCompilationUnit(), renamedCUName));
} catch (CoreException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably log this, in case it happens so users at least have something in the log when nothing happens.

- Changes to target platform are quite big since jdt feature can't be used
- Update target platform to latest 4.31 I-build (I20240128-1800).
- [21] JEP 443 Unnamed patterns and variables
- Adjust testcase due to fix for eclipse-jdt/eclipse.jdt.ui#1111

Co-authored-by: Александър Куртаков <[email protected]>
Co-authored-by: Roland Grunberg <[email protected]>
@rgrunber rgrunber force-pushed the jdt-incubator-releng branch from afbe7db to 8a1ace1 Compare January 29, 2024 21:13
@rgrunber
Copy link
Contributor

rgrunber commented Jan 29, 2024

Ok, this works well for me. I noticed one thing. Mainly that the repository/pom.xml for the incubator project lacks an <includeAllSources>true</includeAllSources>. It's needed to avoid the dreaded "Please attach sources" on the jdt.core bundle. I can fix that pretty easily though. In fact, it's probably easier to just duplicate the bundle IDs and add .source in the category.xml than to redefine the repository plugin and add the property.

Just fixed it at eclipse-jdtls/eclipse-jdt-core-incubator@9d8e609#diff-8ccc007f81194cc47a96ef7f50b7ade2d6964e99ae8c42bc4407bc42e82e808fR6 .

Update: Theeeere we are : https://download.eclipse.org/jdtls/jdt-core-incubator/snapshots/plugins/

@rgrunber rgrunber merged commit 1c05786 into eclipse-jdtls:master Jan 29, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants