Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Discouraged access warnings since storage implementations were moved to internal packages


----- Ursprungligt meddelande -----
> On Tue, Mar 19, 2013 at 4:13 PM, Matthias Sohn
> <matthias.sohn@xxxxxxxxx> wrote:
> > Since https://git.eclipse.org/r/#/c/11273/ was submitted jgit
> > suffers from
> > 181 discouraged access warnings caused by types no longer
> > accessible
> > since they were moved to internal packages.
> >
> > The affected bundles are
> > org.eclipse.jgit.ant.test
> > org.eclipse.jgit.http.server
> > org.eclipse.jgit.http.test
> > org.eclipse.jgit.junit.http
> > org.eclipse.jgit.junit
> > org.eclipse.jgit.pgm
> >
> > some of these bundles are also used by EGit.
> > Not sure what's the best way to fix this problem.
> > Should we extend the number of x-friends ?
> 
> x-friends within org.eclipse.jgit is OK.
> 
> As for EGit, we should try to avoid EGit from talking to the internal
> packages.
> 
> If that isn't possible, we can friend EGit in the short-term but
> long-term JGit needs to either republish the API as a non-internal,
> or
> needs to wrap it as something we can commit to long-term. I used a
> pretty big hammer when I moved things to internal, but I moved a lot
> of what I consider "low-level details" that applications shouldn't
> need to know about. I may have moved a little too much, but these
> warnings are a hint towards that.
> 
> FWIW Gerrit had only ~5 references. Most of them were to Gerrit
> abusing LockFile for its own pointless reasons. So you can build a
> reasonable application on top of JGit without touching the newly
> internal APIs.

It's not that bad actually. EGit doesn't use that many internal JGit APIs,
it just uses the sama API in many places, ie. org.eclipse.jgit.internal.storage.file

-- robin


Back to the top