Bug 559526 - Not able to upgrade eGit to version 5.6.0.201912101111-r
Summary: Not able to upgrade eGit to version 5.6.0.201912101111-r
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 5.6   Edit
Hardware: PC Windows 10
: P3 critical (vote)
Target Milestone: 5.7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-24 13:02 EST by Ankur Jain CLA
Modified: 2020-02-20 10:18 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Jain CLA 2020-01-24 13:02:03 EST
Trying to upgrade to egit version 5.6.0.201912101111-r but getting these errors:

"Cannot complete the install because one or more required items could not be found.
  Software being installed: Git integration for Eclipse - Task focused interface 5.6.0.201912101111-r (org.eclipse.egit.mylyn.feature.group 5.6.0.201912101111-r)
  Missing requirement: Git integration for Eclipse - UI 5.6.0.201912101111-r (org.eclipse.egit.ui 5.6.0.201912101111-r) requires 'osgi.bundle; org.apache.ant [1.10.5,2.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: Git integration for Eclipse - Task focused interface 5.6.0.201912101111-r (org.eclipse.egit.mylyn.feature.group 5.6.0.201912101111-r)
    To: org.eclipse.equinox.p2.iu; org.eclipse.egit.mylyn.ui [5.6.0.201912101111-r,5.6.0.201912101111-r]
  Cannot satisfy dependency:
    From: EGit Mylyn UI 5.6.0.201912101111-r (org.eclipse.egit.mylyn.ui 5.6.0.201912101111-r)
    To: java.package; org.eclipse.egit.ui [5.6.0,5.7.0)"
Comment 1 Matthias Sohn CLA 2020-01-24 18:08:37 EST
The dependency from org.eclipse.egit.ui to org.apache.ant was introduced in
https://git.eclipse.org/r/#/c/149270/27/org.eclipse.egit.ui/META-INF/MANIFEST.MF
to implement ref filtering in the history view.

org.eclipse.egit.ui.internal.history.RefFilterHelper imports the following two classes

org.apache.tools.ant.types.selectors.TokenizedPath
org.apache.tools.ant.types.selectors.TokenizedPattern

I see the following problems with this dependency:
- by using these 2 classes we add a 3.1 MB dependency
- the dependency was added using RequireBundle which we generally try to avoid
in favour of package dependencies, we only require bundles available in eclipse platform
- org.apache.ant wasn't added to the EGit p2 repository, this has the effect that EGit cannot be installed from the egit p2 repository if org.apache.ant 1.10.7 isn't already available in the Eclipse installation or another active update site.

Committers probably didn't recognize this problem since they typically have egit and jgit projects imported in Eclipse and org.eclipse.jgit.ant brings in the org.apache.ant 1.10.7 which is contained in the development target platform.
Comment 2 Michael Keppler CLA 2020-01-26 04:55:05 EST
Could we eventually use https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher%28java.lang.String%2 instead? That one supports double asterisk ant style wildcards.
Comment 3 Eclipse Genie CLA 2020-01-26 07:49:16 EST
New Gerrit change created: https://git.eclipse.org/r/156578
Comment 4 Eclipse Genie CLA 2020-01-26 07:52:29 EST
New Gerrit change created: https://git.eclipse.org/r/156579
Comment 5 Andrey Loskutov CLA 2020-01-26 07:54:01 EST
(In reply to Eclipse Genie from comment #3)
> New Gerrit change created: https://git.eclipse.org/r/156578

(In reply to Eclipse Genie from comment #4)
> New Gerrit change created: https://git.eclipse.org/r/156579

Not as nice as it could be (PathMatcher is internal jgit API), but this avoids pulling in any 3rd party dependency to egit by re-using PathMatcher from jgit.
Comment 6 Andrey Loskutov CLA 2020-01-26 11:07:16 EST
(In reply to Andrey Loskutov from comment #5)
> (In reply to Eclipse Genie from comment #3)
> > New Gerrit change created: https://git.eclipse.org/r/156578

Note, that this patch will fail for at least two reasons now: the jgit package must be made visible first (https://git.eclipse.org/r/156579), and EGit tests are currently not compiling anyway due bug 559547.
Comment 7 Eclipse Genie CLA 2020-02-20 05:43:40 EST
Gerrit change https://git.eclipse.org/r/158007 was merged to [master].
Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=f2b67be62aa02facd23a6b09a3b759abedcb9e10
Comment 8 Eclipse Genie CLA 2020-02-20 07:59:00 EST
Gerrit change https://git.eclipse.org/r/156578 was merged to [master].
Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=697657c3775d94bae11d900fa63cfcd04d340a4c