Skip to content

Exception triggers when generating HTML output (for Go projects) #72

Open

Description

Using the --output-format html (with or without -o out.html) results in the following exception and creation of an empty report file. I have encountered this only while auditing a Go project.

it-depends ../project-code/ --depth-limit 3 --output-format html:

Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/3.8.12/bin/it-depends", line 8, in <module>
    sys.exit(main())
  File "/Users/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/it_depends/cli.py", line 201, in main
    output_file.write(graph_to_html(package_list, collapse_versions=not args.all_versions))
  File "/Users/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/it_depends/html.py", line 94, in graph_to_html
    graph = graph.collapse_versions()
  File "/Users/user/.pyenv/versions/3.8.12/lib/python3.8/site-packages/it_depends/dependencies.py", line 325, in collapse_versions
    version = max(p.version for p in instances)
TypeError: '>' not supported between instances of 'GoVersion' and 'GoVersion'

JSON and Dot output formats work as expected.
Tested with it-depends version 0.1.1 installed via pip on Python 3.8.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions