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

Installing Wild Web Developer tools forces update of JustJ and Platform to latest version #1380

Closed
sratz opened this issue Oct 30, 2023 · 13 comments
Assignees

Comments

@sratz
Copy link

sratz commented Oct 30, 2023

Follow-up on #938.

Wild Web Developer uses the same updatesite for both the RCP product and the regular update site.

This is a problem, as the RCP product update site also contains transitive dependencies such as JustJ which are undesired in the 'other RCP product + install wild web as plugin' use-case.

An attempt was made in #1238 to filter out these dependencies, but this actually made things worse:

While it does result in the dependencies to be gone from the updatesite, the updatesite now contains references to the dependencies:
https://github.com/vrubezhny/wildwebdeveloper/blob/62d007dcfaf17c69cdf84f15ed8ae03952482245/repository/category.xml#L84-L85

This results

  1. in these referenced repositories to be added to users' 'Available Update Sites' by p2, even when the check-for-update operation is canceled:
  • Before
    image

  • Check for updates
    image

  • Press Cancel (!) and check update sites again:
    image

  1. What's worse, these two referenced repositories are not static updatesites, but dynamic ones (/latest). This actually causes an update of the underlying Platform and JustJ to potentially unwanted, newer versions.

I think using <repository-reference> in category.xml is a bad idea and should be removed.

Instead, the update-site should be split in two: one for the actual RCP product including the platform and JustJ dependencies, and one for the pure wild web developer features.

@akurtakov
Copy link
Contributor

So to clarify what happens here:

  • Download/install EPP package - it has Java 17
  • Check for updates and Java 21 gets installed
    Do I get it correct?

@sratz
Copy link
Author

sratz commented Feb 7, 2024

I'd argue that -- let's call them 'platform dependencies' -- such as platform itself and justJ should not be included in the update site of WWD like this.

If anything, an update site should point to fixed versions of such dependencies, not something dynamic like /latest.

@OLibutzki
Copy link
Contributor

OLibutzki commented Mar 18, 2024

I just want to concretize how critical this issue is.

Our current situation:
We have been using https://download.eclipse.org/technology/m2e/releases/latest to install m2e in an Eclipse 4.30 (2023-12) release.

After Eclipse 4.21 (2024-03) has been released and an update in the Eclipse IDE has been performed, we were not able to open Java files anymore. Here is the stacktrace:

java.lang.NoClassDefFoundError: org/eclipse/jface/text/rules/FastPartitioner
	at org.eclipse.jdt.internal.ui.text.JavaPartitionerManager.createDocumentPartitioner(JavaPartitionerManager.java:52)
	at org.eclipse.jdt.ui.text.JavaTextTools.createDocumentPartitioner(JavaTextTools.java:307)
	at org.eclipse.jdt.ui.text.JavaTextTools.setupJavaDocumentPartitioner(JavaTextTools.java:383)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaDocumentSetupParticipant.setup(JavaDocumentSetupParticipant.java:39)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBufferManager$1.run(ResourceTextFileBufferManager.java:151)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBufferManager.createEmptyDocument(ResourceTextFileBufferManager.java:165)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:235)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:247)
	at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:116)
	at org.sonarlint.eclipse.core.internal.resources.DefaultSonarLintFileAdapter.getDocument(DefaultSonarLintFileAdapter.java:66)
	at org.sonarlint.eclipse.core.internal.jobs.AsyncServerMarkerUpdaterJob.updateMarkers(AsyncServerMarkerUpdaterJob.java:76)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2453)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2473)
	at org.sonarlint.eclipse.core.internal.jobs.AsyncServerMarkerUpdaterJob.doRun(AsyncServerMarkerUpdaterJob.java:52)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarJob.run(AbstractSonarJob.java:37)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jface.text.rules.FastPartitioner cannot be found by org.eclipse.jdt.core.manipulation_1.21.0.v20240221-0406
	... 17 more

As one can see: Because of wildwebdeveloper adding https://download.eclipse.org/eclipse/updates/latest as p2 repository, jdt got updated to the 4.31 version. Unfortunately this update is incomaptible with the 4.30 JFace version.

It took us hours to investigate this issue until we ended up in the content.xml of the wildwebdeveloper P2 repository.

@mickaelistria
Copy link
Contributor

Anyone who is willing to provide a fix to improve that is more than welcome.
At the moment, none of the maintainer has plan to fix it; but we'd make highest priority to review incoming fixes as pull requests.

@OLibutzki
Copy link
Contributor

I am not sure which direction to solve this issue is the best one.

Is it an option to omit the repository-references (https://github.com/eclipse-wildwebdeveloper/wildwebdeveloper/blob/master/repository/category.xml#L87) entirely?

@mickaelistria
Copy link
Contributor

Is it an option to omit the repository-references (https://github.com/eclipse-wildwebdeveloper/wildwebdeveloper/blob/master/repository/category.xml#L87) entirely?

That's worth trying.

@OLibutzki
Copy link
Contributor

That's worth trying.

Here we go: #1491

@mickaelistria
Copy link
Contributor

Let's close then with #1491 being merged. Note that at this stage, the best next step is probably to remove the product from the build/repo.

@merks
Copy link
Contributor

merks commented May 3, 2024

This continues to cause problems. In this case, users can update EPP 2024-03 to EPP 2024-06 without actually updating their JRE and then the updated product simply fails to start:

eclipse-equinox/p2#508

@mickaelistria
Copy link
Contributor

This should be fixed with a new release. I'm preparing one now.

@merks
Copy link
Contributor

merks commented May 6, 2024

That sounds great.

@mickaelistria
Copy link
Contributor

Released Wild Web Developer 1.3.4 and submitted eclipse-simrel/simrel.build#335

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

5 participants