Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove export of vendored project. #10

Merged
merged 2 commits into from Oct 9, 2022

Conversation

nuclearsandwich
Copy link

ament's dependency export system relies on adding corresponding exported dependencies in the package.xml file.

It actually would be possible to use this export if an additional buildtool_export_depend on ament_cmake was used so that all downstream packages required ament_cmake to build using this package.

However, that's a bit heavy handed for a vendor package in particular and it is a recommended practice that vendor packages be as transparent as possible so that they can be removed once deprecated.

This change will require updates to packages consuming this vendor package.


An additional change updates the package.xml to reflect that git is a required build tool when fetching git repositories using externalproject_add.

Git is being used to fetch the vendored project so it should be
available at build time.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
ament's dependency export system relies on adding corresponding exported
dependencies in the `package.xml` file.

It actually would be possible to use this export if an additional
`buildtool_export_depend` on `ament_cmake` was used so that all
downstream packages required `ament_cmake` to build using this package.

However, that's a bit heavy handed for a vendor package in particular
and it is a recommended practice that vendor packages be as transparent
as possible so that they can be removed once deprecated.

This change will require updates to packages consuming this vendor
package.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
@orensbruli orensbruli merged commit 63cb853 into rolling Oct 9, 2022
@orensbruli orensbruli deleted the nuclearsandwich/dependencies branch October 9, 2022 15:29
orensbruli pushed a commit that referenced this pull request Nov 2, 2022
* Add buildtool dependency on git.

Git is being used to fetch the vendored project so it should be
available at build time.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* Do not export dependencies on the vendored project.

ament's dependency export system relies on adding corresponding exported
dependencies in the `package.xml` file.

It actually would be possible to use this export if an additional
`buildtool_export_depend` on `ament_cmake` was used so that all
downstream packages required `ament_cmake` to build using this package.

However, that's a bit heavy handed for a vendor package in particular
and it is a recommended practice that vendor packages be as transparent
as possible so that they can be removed once deprecated.

This change will require updates to packages consuming this vendor
package.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
orensbruli pushed a commit that referenced this pull request Nov 11, 2022
* Add buildtool dependency on git.

Git is being used to fetch the vendored project so it should be
available at build time.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* Do not export dependencies on the vendored project.

ament's dependency export system relies on adding corresponding exported
dependencies in the `package.xml` file.

It actually would be possible to use this export if an additional
`buildtool_export_depend` on `ament_cmake` was used so that all
downstream packages required `ament_cmake` to build using this package.

However, that's a bit heavy handed for a vendor package in particular
and it is a recommended practice that vendor packages be as transparent
as possible so that they can be removed once deprecated.

This change will require updates to packages consuming this vendor
package.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
orensbruli added a commit that referenced this pull request Nov 11, 2022
* 0.1.1

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* Added ament_cmake_libraries dependence

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* 0.1.2

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* Revert "Change install behavior (#7)"

This reverts commit b3bbc75.

Signed-off-by: Michael X. Grey <grey@openrobotics.org>

* testing cmake vendoring

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* Updated changelog

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* 0.1.3

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>

* Update vendor package build. (#9)

* Remove extra arguments that aren't used.

According to the ExternalProject docs (1) `PREFIX` is used as the prefix
for the project directory generator expressions but is not otherwise
passed to the external project's build directly.

Similarly the docs for the `INSTALL_DIR` option state:

> Installation prefix to be placed in the <INSTALL_DIR> placeholder.
> This does not actually configure the external project to install to the given prefix.
> That must be done by passing appropriate arguments to the external project configuration step, e.g. using <INSTALL_DIR>.

So both of these arguments are unused and sources for potential
confusion.

(1) https://cmake.org/cmake/help/latest/module/ExternalProject.html

* Pin specific commit of vendored project.

Even when targeting an upstream project's branch rather than a specific
release vendor packages should pin to a specific commit so that changes
to the upstream package are only introduced intentionally and not due to
an unrelated rebuild on the build farm.

* Remove unneeded BUILD_ALWAYS argument.

This argument does not do anything for this external project. Build farm
builds will always build this package when required since they run in a
clean workspace and since this external project is configured via git
CMake has the ability to detect changes and know that a rebuild is
required when working locally.

From the documentation for this option:

> Enabling this option forces the build step to always be run.
> This can be the easiest way to robustly ensure that the external project's own build dependencies are evaluated rather than relying on the default success timestamp-based method.
> This option is not normally needed unless developers are expected to modify something the external project's build depends on in a way that is not detectable via the step target dependencies (e.g. SOURCE_DIR is used without a download method and developers might modify the sources in SOURCE_DIR).

* Fix formatting and update build options against changes in main.

This package does not use the standard `BUILD_TESTING` CMake argument
but it has namespaced arguments for building tests and examples.

While updating these I also fixed some inconsistent whitespace and use
the CMake values ON/OFF for all boolean values for consistency.

* Remove CMake patch which is not required for relocatability.

This patch is adapted from an earlier version of CMakeLists.txt and does
not appear to be required to build and find the vendored package in a
local colcon workspace.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* 0.2.0

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* Remove export of vendored project. (#10)

* Add buildtool dependency on git.

Git is being used to fetch the vendored project so it should be
available at build time.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* Do not export dependencies on the vendored project.

ament's dependency export system relies on adding corresponding exported
dependencies in the `package.xml` file.

It actually would be possible to use this export if an additional
`buildtool_export_depend` on `ament_cmake` was used so that all
downstream packages required `ament_cmake` to build using this package.

However, that's a bit heavy handed for a vendor package in particular
and it is a recommended practice that vendor packages be as transparent
as possible so that they can be removed once deprecated.

This change will require updates to packages consuming this vendor
package.

Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>

* 0.2.1

Signed-off-by: Esteban Martinena <orensbruli@gmail.com>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Steven! Ragnarök <steven@nuclearsandwich.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants