Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Why is Tycho manifest-first?

On 17/11/2011 11:15, Aaron Digulla wrote:
Zitat von Mickael Istria <mickael.istria@xxxxxxxxxxxxxx>:

Hi,

MANIFEST.MF is the file that is used at dev-time by PDE and at runtime by your OSGi Container to deal with modularization. Maven is build-time modularization, based on pom.xml to express dependencies. Then the general issue with Maven and OSGi is that there are 2 ways to express dependencies. Tycho probably made the right choice choosing the approach that is the state-of-the-art: relying on MANIFEST.MF.
If you want to have a pom-first approach, how do you deal with PDE at dev-time without a good MANIFEST.MF?

Simple: I'm not using PDE if I can avoid it. While the Maven integration in Eclipse isn't perfect (for various reasons), PDE with its infinitely recursive Ant scripts is worse.
I think you are confusing PDE (IDE Tooling) and PDE Build.
Also I am not sure of what you mean by "worse". This is a contextual word, without the context, it is not easy to get what are the concrete issues ;)

So far, I have tried to build these projects with PDE: Equinox, SWT, Platform, Console. I failed every time because of some obscure error message in line 15000 of some Ant script at recursion level 97. Enabling debug gives me a nice 150MB log file which is too big to understand.

Error messages usually are incomprehensible to me and any Eclipse developer that I asked.
That's true, and that's why Tycho is meant for: replace PDE build with a more transparent build system. I think it is no more time to say the PDE Build is not that good. PDE Build is past, everybody on this mailing list agrees with it.

For example, it took me 4 hours to set up a BIRT build using Maven (that includes finding all the sources and removing any trace of PDE). That build takes exactly 53 seconds for 4000 source files. The build creates a working bundle and I know exactly what goes into the build. No p2 repo is considered (see below), and no PDE script/tool is used.
Ok.

My build is stable, it doesn't depend on some CVS server on the other side of the planet, I know what it is doing, it's fast and reliable.
So is a Tycho-based build. It does not rely on a CVS server; it relies on p2 repositories; you know what it is doing, it is reliable. But IMHO, it is still much easier as a plugin developer to have MANIFEST-first approach, because the tooling (IDE) works well doing so. Also the MANIFEST.MF is a very important file for the developer, I prefer editing it than having it generated.

When I tried to build the same project with PDE, I ran into these problems:
1. The build only works on a single machine because the PDE scripts contain absolute paths. For some reason, -Dkey=value is sometimes ignored. All my attempts to override the paths didn't work. Even when I changed the file, the build would checkout the files from the CVS server and overwrite my changes.
2. The CVS checkout URLs only work inside the Eclipse network.
3. During the build, I saw error messages that no one ever saw before. A developer from the BIRT team tried to help but he simply didn't know what the error message meant or how to fix it. It was a typical "but it works on my machine" situation.
4. Unlike Maven projects, PDE projects always depend on external factors like the Target Platform. There is no simple, sure-fire way to create a PDE project which will build out of the box for everyone.
The main problem with PDE is that it gives developers too many options.

On top of that, I haven't found a way to build a site with exactly the version of features/plugins that I want. Even if it works perfectly, all plugin qualifiers get updated even though the plugin code didn't change.

In my view, one can argue that MANIFEST.MF is "state-of-the-art". But PDE is definitely not.
Ok, PDE Build is now bad. I agree. But I meant PDE Tooling in the IDE.

I have several concerns with p2:
- Unlike Maven Central, p2 repositories are very unreliable. Someone uploads a new version of a plugin and my builds change.
That's true, it is up to project providing repositories to set up a policy to have reliable p2 repositories. However, having your build changing is not that important IMHO, because if the p2 repository is updated, you have a build that changes, but it follows update of different projects. Think about how your end-users will consume your product: in Eclipse, if they use a p2 repository to install it, they'll probably have also the latest versions of other repositories. As a plugin developer, I am pretty happy to see my build automatically switching to the maintenance release of Indigo because the content of the repo changed. It ensures me people who get a latest release of Eclipse will see the project working.

- If you're not in the US, starting a Maven build which uses the official Indigo repo can take up to 15 minutes for the connection phase alone! This is unacceptable. To drive this home: "mvn clean" takes 15 minutes!!!
That's true. I've never reached 15 minutes, but that's long. Maybe the idea behing this issue is the lack of mirroring support in p2 or Maven in general. You should open a bug against p2 explaining that an install should be able to delegate downloads to a mirror. That would be a valuable improvement.

From my point of view, p2 and PDE are a liability and I avoid both technologies even at great cost.
"even at great cost": That's probably where we have different ways of thinking. For me, Tycho is low-cost and reliable enough. All other approaches I've seen to build plugins are much more expensive for results that are less satisfying,

I don't mind having a Maven build that creates a MANIFEST.MF (and plugin.xml) from data from the POM because the POM gives me find grained control which PDE does not.
You don't; but I do mind. The great tooling providing in Eclipse IDE needs this MANIFEST.MF and plugin.xml, I cannot work without it, and it is an easier approach since they are the concrete files that are consumed at runtime.


Seens like we have different use-cases and requirements for a build. But AFAIK, I am not aware of an Eclipse project (plugin or RCP) that have suffered from moving to Tycho, even with p2 ;)
--

Mickael Istria
R&D Engineer, Eclipse Plug-in RCP Developer

PetalsLink - Open Source SOA

My blog - My Tweets


Back to the top