In our build pipeline we encountered a race condition when building multiple rust projects with multiple build jobs enabled.
The setup was similar to the following:
A is a rust project built through colcon-ros-cargo
B is a ros package like std_msgs which message definitions are generated for.
C is a rust project built through colcon-ros-cargo and depends on A and B
The build was triggered with colcon build --packages-up-to C.
It would fail if:
Job 1 would start building B first and register itself to config.toml
Job 2 would start building A, cargo ament build would discover package B in config.toml, try to look for the Cargo.toml, but this was not generated by Job 1 yet and the build fails.
I think this can be avoided in two ways:
- modify
config.toml on successful subpackage build
- cargo ament-build ignores entries in
config.toml that it does not depend on
So this might not be the correct repository to report this for.
In our build pipeline we encountered a race condition when building multiple rust projects with multiple build jobs enabled.
The setup was similar to the following:
Ais a rust project built through colcon-ros-cargoBis a ros package likestd_msgswhich message definitions are generated for.Cis a rust project built through colcon-ros-cargo and depends onAandBThe build was triggered with
colcon build --packages-up-to C.It would fail if:
Job 1would start buildingBfirst and register itself toconfig.tomlJob 2would start buildingA, cargo ament build would discover package B inconfig.toml, try to look for the Cargo.toml, but this was not generated byJob 1yet and the build fails.I think this can be avoided in two ways:
config.tomlon successful subpackage buildconfig.tomlthat it does not depend onSo this might not be the correct repository to report this for.