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

Reuse colcon_ros package identification #32

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

luca-della-vedova
Copy link
Member

This PR removes the manual package identification step and just reuses the colcon_ros package identification. The package will now only implement build and test tasks and let colcon_ros handle identification.

I ported the error warning for missing cargo-ament-build that is now a build time error rather than an identification time warning (perhaps a better failure mode?), I haven't ported the missing Cargo.toml error though (cargo-ament-build will fail anyway in that scenario, we should probably just improve the error on that side)

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
@cottsay
Copy link
Member

cottsay commented Dec 5, 2024

I haven't ported the missing Cargo.toml error though

FWIW, an ament_python package without a setup.py will fail during the build phase.

Additionally, the CMake extension doesn't fail on a missing cmake executable until the build phase as well.

Neither of those packages have any logic to limit the error to a single instance. You may want to consider dropping the global error-once approach here, too. If someone is only looking at log output and not console output, they may choose to inspect a package which didn't get the error, which may be confusing when the package failed with no messages.

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
@luca-della-vedova
Copy link
Member Author

Thanks for the quick feedback! Removed the "once logic" in 6506a7e.

I agree that failing at buildtime is OK and it is what now happens, it's just that currently the error message is not very informative so the logic to print it at identification time was to workaround that, specifically this is what is output when there is a ros.ament_cargo package without a Cargo.toml:

--- stderr: rust-sample-package
Error in cargo-ament-build

Caused by:
    0: No such file or directory (os error 2)
    1: No such file or directory (os error 2)
---

So not really any specific mention of what the issue is, but I would argue that is something that should be fixed in cargo-ament-build and not as a workaround in this package that uses it

@luca-della-vedova luca-della-vedova merged commit 7d90af6 into main Dec 6, 2024
16 checks passed
@luca-della-vedova luca-della-vedova deleted the luca/remove_package_identification branch December 6, 2024 04:28
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.

2 participants