eclipse-platform / .github

Common contribution content for eclipse-platform repositories
https://www.eclipse.org/eclipse/
4 stars 10 forks source link

"Perform setup tasks" fails #154

Closed fedejeanne closed 9 months ago

fedejeanne commented 9 months ago

I updated all my repos in the WS to the latest status and ran Help > Perform setup tasks and got this error:

Updating Git status for repository eclipse.jdt.ui
ERROR: org.eclipse.oomph.targlets.core code=0 Resolution problems
  at org.eclipse.oomph.targlets.internal.core.TargletContainer.forceUpdate(TargletContainer.java:919)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl$4.run(TargletTaskImpl.java:1232)
  at org.eclipse.oomph.util.pde.TargetPlatformUtil.runWithTargetPlatformService(TargetPlatformUtil.java:120)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl.perform(TargletTaskImpl.java:1092)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3864)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:5200)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2453)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2478)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:5193)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3798)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3773)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3651)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:592)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:721)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  ERROR: org.eclipse.oomph.targlets.core code=0 Problems resolving composed target 'eclipse-sdk-prereqs'
    ERROR: org.eclipse.pde.core code=0 Problems occurred while resolving the target contents
      ERROR: org.eclipse.pde.core code=0 Problems loading repositories
        ERROR: org.eclipse.pde.core code=0 Unable to locate installable unit org.eclipse.orbit.xml-apis-ext 1.0.0.v20230815-1152
        ERROR: org.eclipse.pde.core code=0 Unable to locate installable unit org.eclipse.orbit.xml-apis-ext.source 1.0.0.v20230815-1152

What I did for each repo in my WS (in the console):

# Sync fork with GitHub-CLI
gh repo sync fedejeanne/<repo_name> -b master

# Switch to master, discard uncommitted/unstaged changes with '-f'
git checkout master -f

# Remove all local changes
git reset --hard

# PULL
git pull

These are my repos after performing the setup tasks: image

Notice that eclipse.jdt.ui has local changes after performing the setup tasks, but they are irrelevant: image

@merks do you thing this is related to #150 ?

laeubi commented 9 months ago

For me it helped to remove the eclipse-sdk-prereqs project from the workspace.

fedejeanne commented 9 months ago

For me it helped to remove the eclipse-sdk-prereqs project from the workspace.

You mean this one?

image

I closed it and tried again, but got this other error:

Committing the provisioning operation.
ERROR: org.eclipse.oomph.targlets.core code=0 Resolution problems
  at org.eclipse.oomph.targlets.internal.core.TargletContainer.forceUpdate(TargletContainer.java:919)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl$4.run(TargletTaskImpl.java:1232)
  at org.eclipse.oomph.util.pde.TargetPlatformUtil.runWithTargetPlatformService(TargetPlatformUtil.java:120)
  at org.eclipse.oomph.setup.targlets.impl.TargletTaskImpl.perform(TargletTaskImpl.java:1092)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3864)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:5200)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2453)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2478)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:5193)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3798)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3773)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3651)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:592)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:721)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  ERROR: org.eclipse.oomph.targlets.core code=0 Problems resolving composed target 'eclipse-sdk-prereqs'
    ERROR: org.eclipse.oomph.targlets.core code=0 A target definition named 'eclipse-sdk-prereqs' does not exist.
merks commented 9 months ago

The dirty project is because it has an m2e nature that was causing errors.

If you do this, is there a single eclipse-sdk-prereqs.target resource?

image

laeubi commented 9 months ago

I closed it and tried again, but got this other error:

I literally removed it from the workspace (but not delete the contents on disk)

merks commented 9 months ago

And I don't get the comment about removing eclipse-sdk-prereqs because the targlet compose that target platform so at least one version of it must be present in the workspace as I understand it.

image

fedejeanne commented 9 months ago

The dirty project is because it has an m2e nature that was causing errors.

If you do this, is there a single eclipse-sdk-prereqs.target resource?

image

I reopened the project and I only see this one:

image

merks commented 9 months ago

That looks correct. PDE also sometimes has caching problems. :-(

If all else fails, you can delete this and save it:

image

merks commented 9 months ago

You can also try to open the *.target in the target editor and let it finish resolving. That might refresh the PDE cache if that's the problem.

merks commented 9 months ago

Not that it's helpful, but this does "just work for me":

image

fedejeanne commented 9 months ago

You can also try to open the *.target in the target editor and let it finish resolving. That might refresh the PDE cache if that's the problem.

Thank you, that did the trick!

Closing this issue.

merks commented 9 months ago

The *.target doesn't have a sequenceNumber and it's possible that incrementing such a thing would help PDE update the cache. E.g., in Oomph we have this:

<target name="Generated from Oomph" sequenceNumber="134">

and we increment it when we regenerate it....

@HannesWell

Do you think such a thing would help?

HannesWell commented 9 months ago

Do you think such a thing would help?

It could help, but I don't know this for sure since I never checked for what that number is really used for.

In general PDE should be smart enough to detect changes even without such hints, e.g. based on the File hash or changes in the XML tree.