-
Couldn't load subscription status.
- Fork 34
Open
Description
Hello
In conan 2.21+, the internal field of the dependency graph node.dependencies was renamed to node.edges. When attempting to create an SBOM with the command
conan sbom:cyclonedx --format 1.4_json
at the “Computing dependency graph” stage, the script terminates with the error “WARN: deprecated: Node.dependencies is private and shouldn't be used. It is now node.edges. Please fix your code, Node.dependencies will be removed in future versions” which causes the final sbom to lack transitive dependencies and a dependency graph.
This problem can be fixed by renaming dep.dependencies in the file “extensions/commands/sbom/cmd_cyclonedx.py”
before
for dep in deps_graph.nodes:
if filter_context(dep):
bom.register_dependency(components[dep], [components[dep_dep.dst] for dep_dep in dep.dependencies if filter_context(dep_dep.dst)])
return bom
after
for dep in deps_graph.nodes:
if filter_context(dep):
bom.register_dependency(components[dep], [components[dep_dep.dst] for dep_dep in dep.edges if filter_context(dep_dep.dst)])
return bom
Metadata
Metadata
Assignees
Labels
No labels