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

New Bnd OSGi Workspace from template bndtools/workspace branch: origin/6.4 fails. #5476

Closed
zelorun opened this issue Dec 13, 2022 · 13 comments
Closed

Comments

@zelorun
Copy link

zelorun commented Dec 13, 2022

Using a fresh Eclipse IDE 2022‑12, installing Bndtools using the Marketplace is not able to create a new Bnd OSGi Workspace (tested on Windows and Ubuntu).

In the Preview Changes window it shows the error:

"Checkout conflict with files: gradle.properties"

The list of files is empty. Next > button is disabled.

Version:
Bndtools 6.4.0.REL-202211291949-g25e4898 bndtools.main.feature.feature.group Bndtools

@zelorun
Copy link
Author

zelorun commented Dec 16, 2022

@pkriens can you please validate this issue?

My first idea was that this issue is related to the cloned workspace repository, but for what ever reasons it works if using another branch than the offical current 6.4.0.

@mikerumpf
Copy link

I encountered the same issue.

@zelorun
Copy link
Author

zelorun commented Jan 13, 2023

@pkriens if you cannot reproduce the issue on your system please feel free to contact me for a coop session.

@pkriens
Copy link
Member

pkriens commented Jan 13, 2023

@zelorun can you send me your email address? I am peter.kriens@aQute.biz

@pkriens
Copy link
Member

pkriens commented Jan 13, 2023

I got it on mac as well ...

@pkriens
Copy link
Member

pkriens commented Jan 13, 2023

As an intermediate fix, it seems to work if you use an alternative template. When I moved back to the template selection and then picked the other one it worked.

@pkriens
Copy link
Member

pkriens commented Jan 16, 2023

The problem seems to be in the templates that specify a branch/tag. Using the (default) master branch works fine it seems.

The current code checks out the branch in a new branch (-b in the checkout I guess). By replacing that option with an option to to just checkout all the files fixes this as far as I can test.

I will make a PR for 7.0.0 and then we should cherry pick this on the next branch and think of delivering a new release 6.4.1

@bjhargrave
Copy link
Member

The code uses Eclipse JGit to perform the git operations. It is possible some change in JGit in the latest version of Eclipse has upset something here.

Have you tried adding setForced(true) to the checkout command (do not confuse with the deprecated and misnamed setForce method)?

				CheckoutCommand checkout = git.checkout()
					.setCreateBranch(true)
					.setName("_tmp")
					.setForced(true);

pkriens added a commit to pkriens/bnd that referenced this issue Jan 16, 2023
…ostly to cherry pick on 6.4.0 because it seems to work on 7.0.0

---
 Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>

Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
@pkriens
Copy link
Member

pkriens commented Jan 17, 2023

Since I could only run this in another Eclipse I tried to change the boolean fields and see what happened. The fix to not create a branch and get all paths worked fine. We know the directory is empty since we just created it.

Can you take this issue to cherry pick it on the next branch?

@pkriens pkriens removed their assignment Jan 17, 2023
@zelorun
Copy link
Author

zelorun commented Jan 23, 2023

@pkriens after checking out this repository (and applying the fix), which command do i have to run to generate the eclipse plug-ins?

@pkriens
Copy link
Member

pkriens commented Jan 23, 2023

you can run it in the Eclipse debugger, that is the easiest way.

The command to create a p2 repository is ./gradlew p2. I am not sure where the are placed but likely in the dist project.

@zelorun
Copy link
Author

zelorun commented Feb 1, 2023

@bjhargrave how long does it normally take until a new (bugfix) release comes out?
This issue is currently blocking all (potential new) bnd enthusiasts as most people will use the eclipse market version as default.

@pkriens
Copy link
Member

pkriens commented Feb 20, 2023

It should work ok for the current snapshot. We do not have a time plan yet but we should have a release in the next few months.

@pkriens pkriens closed this as completed Feb 20, 2023
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

4 participants