Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

Headless importAll fails with error#388

Merged
jonahgraham merged 1 commit intoeclipse-cdt:mainfrom
umairsair:main
May 3, 2023
Merged

Headless importAll fails with error#388
jonahgraham merged 1 commit intoeclipse-cdt:mainfrom
umairsair:main

Conversation

@umairsair
Copy link
Contributor

@umairsair umairsair commented May 2, 2023

importAll fails with error 'Project: .org.eclipse.egit.core.cmp already exists in the workspace!' and no further projects are imported.

The fix is to not go into special directories .metadata and .org.eclipse.egit.core.cmp. Moreover, importAll and removeAll do not fail immediately if operation on a project fails, instead it keeps on performing operation on all projects and at the end, headless builder returns with error code if operation of any project failed

@jonahgraham
Copy link
Member

Thanks @umairsair - LGTM. I'll try to remember to come back and merge this once CI completes. (I tried enabling auto-merge but it doesn't seem to have done what I expect)

@jonahgraham jonahgraham added this to the 11.2.0 milestone May 2, 2023
@umairsair
Copy link
Contributor Author

BTW importAll using another workspace folder as argument will always fail with this error.. should we cater this .org.eclipse.egit.core.cmp project import failure in any way? but I think we should do the current fix anyways, all the projects should be tried to import and report all possible errors..

@jonahgraham
Copy link
Member

BTW importAll using another workspace folder as argument will always fail with this error.. should we cater this .org.eclipse.egit.core.cmp project import failure in any way?

If you have time and energy to fix that case too, please go ahead and I will review/merge it.

but I think we should do the current fix anyways, all the projects should be tried to import and report all possible errors..

+1

@umairsair
Copy link
Contributor Author

If you have time and energy to fix that case too, please go ahead and I will review/merge it.

any suggestions? I can think of ignoring .metadata folder.. to be on a safe side, we can additionally check that its a .metadata folder with version.ini or .log or .plugins folder inside it..

@jonahgraham
Copy link
Member

Turns out I didn't understand the original problem. Can you just ignore .metadata and .org.eclipse.egit.core.cmp when recursing? i.e. treat those as reserved names that the importer can't import recursively.

@jonahgraham
Copy link
Member

Do you want me to hold off submitting this PR until you look at this more?

@umairsair
Copy link
Contributor Author

Do you want me to hold off submitting this PR until you look at this more?

yes please! hold it

Copy link
Member

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

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

I am happy with this change, two minor suggestions for you to have a look at.

importAll fails with error 'Project: .org.eclipse.egit.core.cmp already
exists in the workspace!' and no further projects are imported.

The fix is to not go into special directories .metadata and
.org.eclipse.egit.core.cmp. Moreover, importAll and removeAll do not
fail immediately if operation on a project fails,
instead it keeps on performing operation on all projects and at the end, headless
builder returns with error code if operation of any project failed
@jonahgraham
Copy link
Member

Thanks @umairsair - LGTM and I hope this covers all your use cases. I'll try to remember to come back and merge this once CI completes - feel free to ping me once the build completes.

@umairsair
Copy link
Contributor Author

@jonahgraham

Can you please merge it

@jonahgraham jonahgraham merged commit 0869304 into eclipse-cdt:main May 3, 2023
@jonahgraham
Copy link
Member

Thanks @umairsair!

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

Successfully merging this pull request may close these issues.

2 participants