conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.28k stars 981 forks source link

[feature] Dot (Graphviz) file parsing for `conan.tools` #17062

Closed planetmarshall closed 1 month ago

planetmarshall commented 1 month ago

What is your suggestion?

Somewhat inspired by challenges in updating the llvm-core recipe on CCI.

The original recipe parsed the comments in CMake generated Graphviz files to model the complex inter-component dependencies in LLVM. I changed this in the updated recipe to just parse the generated CMake files directly, but there was a deseire in the PR comments to come up with something more robust.

It would be useful if we had a proper parser for dot files, which could model complex component dependencies in a more robust fashion. I'd propose making the parser from https://github.com/pydot/pydot available via the tools module.

Have you read the CONTRIBUTING guide?

memsharded commented 1 month ago

Hi @planetmarshall

Thanks for your suggestion.

I am afraid that this is too much to be a built-in tool. It would follow under the same reasoning why we removed the CMakeFileAPI that was obtaining information about the generated targets, because it was incomplete and confusing.

The current efforts are focused on a standardized package specification format, we are actively involved in it, you can see our presentations about in in CppCon23 and just one week ago in CppCon24:

Conan 2.7 already contains the tools used in that talk to read and generate CPS files.

This is just part of our engagement in the C++ tooling evolution group, where others such as CMake are active (CMake recently merged in master branch some very experimental generation of CPS files, that we were using in the CppCon24 talk)

Adding a built-in tool to parse dot files because there is one library that generates them, it is simply too much added complexity (and future issues and maintenance) for the value. We will keep focusing our efforts on doing progress on the CPS standard format.

Thanks very much for the feedback!

memsharded commented 1 month ago

Closing as unplanned