.. _migrating_from_format1_to_format2: Migrating from format 1 to format 2 =================================== The differences between format 1 and format 2 only affect the ``package.xml`` with its dependencies. REP-0140_ defines these differences and provides their rationale. ```` ::::::::::::: The ```` tag determines which format to use, change it like this:: ```` :::::::::::: This is a new tag, intended to reduce unnecessary repetition. If your format 1 package contained:: foo foo It should be replaced with:: foo In format 2, that is equivalent to:: foo foo foo ```` :::::::::::::::: This tag is no longer allowed. Wherever found, it must be replaced:: foo In format 2, that is equivalent to these two new tags:: foo foo If the dependency is only used at run-time, only the ```` is needed. If it is only exported to satisfy other packages' build dependencies, use ````. If both are needed, this may be a better choice:: foo ```` ::::::::::::::::: In format 2, this tag can satisfy build dependencies, not just those needed for executing your tests. Unlike format 1, ```` may now refer to a package also declared as some other type of dependency. Some test-only dependencies that formerly required a ````, should now be expressed using ````. For example:: rostest becomes:: rostest In your ``CMakeLists.txt`` make sure your test dependencies are only referenced within the conditional test block:: if (CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) add_rostest(tests/your_first_rostest.test) add_rostest(tests/your_second_rostest.test) endif() ```` :::::::::::::::: This tag defines dependencies needed for building your documentation:: doxygen epydoc python-sphinx rosdoc_lite Those examples are automatically provided by the ROS build farm, but there is no harm in declaring which you actually use. They do not create binary package dependencies, unless they were also declared using some other dependency tag. .. _REP-0140: http://ros.org/reps/rep-0140.html