Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Re: [master] Change I5828502f: (egit/parallelip-jgit) Change jgit build to be completely manifest first

Igor Fedorenko <ifedorenko@xxxxxxxxxxxx> wrote:
> Shawn O. Pearce wrote:
>> Igor Fedorenko <ifedorenko@xxxxxxxxxxxx> wrote:
>>> I was going to finish font&colour decoration tonight, but I'll try to
>>> make the tests work in cli instead. Assuming my wife won't find other
>>> things for me to do, that is ;-)
>>
>> Thanks.
>
> I had a very quick look. You have the same package, say
> org.eclipse.jgit.treewalk, defined both in org.eclipse.jgit and
> org.eclipse.jgit.test bundles. You also use Import-Package to wire
> org.eclipse.jgit and org.eclipse.jgit.test together. Normally, there is
> only one producer of each package, so Import-Package gets resolved to
> org.eclipse.jgit, which effectively hides test classes at runtime.

Wow.  Thanks for figuring that out, I am apparently a complete moron.

I think we do want our tests declared in the same package as the
code they test, sometimes we use package visibility to help test
internals, but we never want to expose that internal to a public
API consumer because we might break the interface in the future.

> I see few possible solutions here.
>
> If running the tests in OSGi runtime is not required, I can switch them
> back to plain junit launcher. This may require switching test project
> back to pom-first mode, but I don't know for sure yet.

The only reason to run the JGit tests in an OSGi runtime was to
take advantage of the manifest-first dependency format.  We could
switch the tests back to pom-first mode.

> Also, keep in mind that bundle classloader.getResource and similar
> methods return bundleentry:// urls, but there are at least few places in
> the tests where you do "new File(cl.getResource(...).toURI())". This
> will have to change to run in OSGi runtime.

Yea, apparently we don't want to run our tests under an OSGi runtime.
At least not right now.

> One of our developers asked webtide folks ;-). The irony, I spent almost
> two days extending tycho to be able to mix p2 and maven repositories.
> When I was done and said the final "woo-hoo!" that developer gave me
> jetty p2 repo url.

:-)

-- 
Shawn.


Back to the top