Skip to content

Commit cf64a41

Browse files
authored
build: rename generate_docs feature to use_ros_shim (#501)
Signed-off-by: Esteve Fernandez <[email protected]>
1 parent cc49a39 commit cf64a41

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/rust-minimal.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
for path in $(colcon list | awk '$3 == "(ament_cargo)" { print $2 }'); do
100100
cd $path
101101
echo "Running clippy in $path"
102-
# Run clippy for all features except generate_docs (needed for docs.rs)
102+
# Run clippy for all features except use_ros_shim (needed for docs.rs)
103103
if [ "$(basename $path)" = "rclrs" ]; then
104104
cargo clippy --no-deps --all-targets -F default,dyn_msg -- -D warnings
105105
else
@@ -115,7 +115,7 @@ jobs:
115115
for path in $(colcon list | awk '$3 == "(ament_cargo)" && $1 != "examples_rclrs_minimal_pub_sub" && $1 != "examples_rclrs_minimal_client_service" && $1 != "rust_pubsub" { print $2 }'); do
116116
cd $path
117117
echo "Running cargo test in $path"
118-
# Run cargo test for all features except generate_docs (needed for docs.rs)
118+
# Run cargo test for all features except use_ros_shim (needed for docs.rs)
119119
if [ "$(basename $path)" = "rclrs" ]; then
120120
cargo test -F default,dyn_msg
121121
elif [ "$(basename $path)" = "rosidl_runtime_rs" ]; then

.github/workflows/rust-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
for path in $(colcon list | awk '$3 == "(ament_cargo)" { print $2 }'); do
100100
cd $path
101101
echo "Running clippy in $path"
102-
# Run clippy for all features except generate_docs (needed for docs.rs)
102+
# Run clippy for all features except use_ros_shim (needed for docs.rs)
103103
if [ "$(basename $path)" = "rclrs" ]; then
104104
cargo clippy --no-deps --all-targets -F default,dyn_msg -- -D warnings
105105
else
@@ -115,7 +115,7 @@ jobs:
115115
for path in $(colcon list | awk '$3 == "(ament_cargo)" && $1 != "examples_rclrs_minimal_pub_sub" && $1 != "examples_rclrs_minimal_client_service" && $1 != "rust_pubsub" { print $2 }'); do
116116
cd $path
117117
echo "Running cargo test in $path"
118-
# Run cargo test for all features except generate_docs (needed for docs.rs)
118+
# Run cargo test for all features except use_ros_shim (needed for docs.rs)
119119
if [ "$(basename $path)" = "rclrs" ]; then
120120
cargo test -F default,dyn_msg
121121
elif [ "$(basename $path)" = "rosidl_runtime_rs" ]; then

rclrs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dyn_msg = ["ament_rs", "libloading"]
5858
serde = ["dep:serde", "dep:serde-big-array", "rosidl_runtime_rs/serde"]
5959
# This feature is solely for the purpose of being able to generate documetation without a ROS installation
6060
# The only intended usage of this feature is for docs.rs builders to work, and is not intended to be used by end users
61-
generate_docs = ["rosidl_runtime_rs/generate_docs"]
61+
use_ros_shim = ["rosidl_runtime_rs/use_ros_shim"]
6262

6363
[package.metadata.docs.rs]
64-
features = ["generate_docs"]
64+
features = ["use_ros_shim"]

rclrs/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
let error_msg =
2727
"ROS_DISTRO environment variable not set - please source ROS 2 installation first.";
2828
cfg_if::cfg_if! {
29-
if #[cfg(feature="generate_docs")] {
29+
if #[cfg(feature="use_ros_shim")] {
3030
println!("{}", error_msg);
3131
return;
3232
} else {

rclrs/src/rcl_bindings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#![allow(missing_docs)]
1313

1414
cfg_if::cfg_if! {
15-
if #[cfg(feature="generate_docs")] {
15+
if #[cfg(feature="use_ros_shim")] {
1616
#[repr(C)]
1717
#[derive(Debug)]
1818
pub struct rcl_allocator_t;

0 commit comments

Comments
 (0)