Make sure your Plugin runs with Eclipse 3.4 when compiling with 3.5
I am developing an Eclipse Plugin and want most of the features to be compatible with Eclipse 3.4. Until now that was no problem because we could just use eclipse 3.4 in the build process, so compiler er开发者_如何学Crors would be found easily.
Now we have a new feature that requires eclipse 3.5 and we cannot use 3.4 for the build any longer but have to use 3.5 at least. The problem now is that we dont know if the old features are still compatible with eclipse 3.4. (at least not by automatic build)
Is there any smart solution to this problem? Make sure some of the plugin features are compatible with eclipse 3.4 and some with 3.5? Preferably a solution that can be automated and added to the build process.
Build your 3.5 plugins with a 3.4 target. Then you'll see which problems ouccurs :). After you have identified your bundles which are using new features only avialable in 3.5 set in your MANIFEST.MF the version number of the dependeny to the used version in 3.5, so that resolving the dependencies of your bundles in a 3.4 target will fail.
In general I would recommend that you should setup your target you're building against in your IDE, to get notified about possible problems while you're writing the code, not when building your plugins.
To make a bundle plugin runnable in a 3.4 and in 3.5 with the new features there will be no easy solution, the probably easiest way is to split the bundle and isolate the 3.5 features in a new bundle, so that your plugins can also be run in a 3.4 environment.
In addition to toms' answer, I would recommend that you run your test suite during a headless build against a 3.5 eclipse as well as a 3.4 eclipse.
The way that we do this in our own shop is this, with 4 automated build jobs:
- Build the product against a 3.5 target eclipse
- Run the tests on the 3.5 target
- Build the product against a 3.4 target eclipse
- Run the tests on the 3.4 target
If the 3.5 target fails, then we don't build a 3.4 target. (Of course, in our case, we are doing 3.6 and 3.5 (and starting to introduce 3.7)).
精彩评论