-
-
Notifications
You must be signed in to change notification settings - Fork 590
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
License References table missing from HTML output #4101
Comments
In my testing, the table in both the versions is coming out the same |
Which versions did you test? Did you use the same input repository and the commands I posted above? |
yes, I did use the same input repo mentioned above above are the screenshots of outputs of both the versions. |
Your screenshots do not show the repo I scanned.
I uploaded my results now, see the initial issue comment, if you'd like to compare.
EDIT: I just noticed what went wrong for you, if you followed my commands. ¹ the path given is a place holder, since I wont know where you cloned the paho.mqtt.repo to. EDIT 2: |
This comment has been minimized.
This comment has been minimized.
So I've been investigating the When printed {
'packages': _CountingAttr(counter=512, _default=Factory(factory=<class 'list'>, takes_self=False), repr=False, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}),
'dependencies': _CountingAttr(counter=513, _default=Factory(factory=<class 'list'>, takes_self=False), repr=False, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={}),
'license_detections': _CountingAttr(counter=514, _default=Factory(factory=<class 'list'>, takes_self=False), repr=False, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={})
} Again we are presented with
Further it contains not only the single licenses present, but also the license concatenation. As of now, I do not understand the change in source of the I would suggest to revert the changes done by 49e7d89 until such implementation is finished and the generation of the license reference table functional. |
The new template expects a sorted list of license objects, therefore the `licenses` dictionary gets converted. None entries get discarded. Finally the empty `license_references` get overridden with the finished list of collected licenses. Fixes aboutcode-org#4101. Signed-off-by: Jens Keim <[email protected]>
@pepper-jk yes I did reproduce the results |
Thanks for confirming. |
The new template expects a sorted list of license objects, therefore the `licenses` dictionary gets converted. None entries get discarded. Finally the empty `license_references` get overridden with the finished list of collected licenses. Fixes aboutcode-org#4101. Signed-off-by: Jens Keim <[email protected]>
I also encounter this issue. I ran multiple test on different repos and the license table/summary is missing. |
Description
The license references table in the HTML output does not get created with the current version of scancode (32.3.1).
The table was previously (31.2.6) called licenses and was located at the very bottom the static HTML output, see image above.
It summarized all licenses found in the scanned project in one table.
Investigation of the issue revealed this is due to an empty
license_references
list given to the template:scancode-toolkit/src/formattedcode/output_html.py
Line 248 in b0aff52
The list is obtained from
codebase.attributes.license_references
:scancode-toolkit/src/formattedcode/output_html.py
Line 84 in b0aff52
Evidence suggests that this is broken ever since 32.0.0, specifically PR #3275, where the source of the license references was changed.
I was able to reproduce the issue on 32.0.1 and 32.3.1 alike. 31.2.6 worked fine, all installed via pip in a miniconda venv.
32.0.0 was not tested directly due to not running out of the box.
Unfortunately I was not able to follow the
codebase
rabbit hole, as its attributes seem to get constructed during runtime.However, I did create a POC, where I reverted the source of license references the legacy implementation: html-license-ref-table-poc
This should show that the html template is not to blame.
Thanks in advance for taking the time Scancode Team.
Kind regards
Jens Keim (JJ)
FOSS Office
HELLA Aglaia
How To Reproduce
Open
result-scancode.html
and observe.I also tried to output directly to html instead of json, but the
license_references
list was still empty.I really hope I did not miss any obvious CLI arguments to fix the issue.
As test input I used paho.mqtt.python at current master (d45de37).
I uploaded the html results here:
license references
at bottom, still namedlicenses
)license references
table is missing)license references
table is missing)license references
at bottom)the POC branch gets a weird version number in the results html, but it is from my POC branch based on 32.3.1
System configuration
The text was updated successfully, but these errors were encountered: