-
Notifications
You must be signed in to change notification settings - Fork 483
feat(spdx2): SPDX output does not yet show license comments #1267
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
Conversation
Hello @ChristopheRequillart, have you consider fixing the test cases? |
Hello @GMishx |
If you check the Travis logs here: https://travis-ci.org/fossology/fossology/builds/477779703?utm_source=github_status&utm_medium=notification |
I see the Travis logs. As I said I don’t touch Test files in my patch. I search in this code and I found only that pclose return -1. Has Travis a problem? |
The Travis is fine, the changes you made are not reflected in the test cases for the agent. You can check similar case here: https://github.com/fossology/fossology/pull/1272/files#diff-d3783e41ad5557d508cc197dffb9dcee |
I do an error on the filename on my previous post. It’s ./src/spdx2/agent_tests/Functional/SchedulerTestRunnerCli.php and not ./src/decider/agent_tests/Functional/SchedulerTestRunnerCli.php. But the problem is the same. $retCode is initialized line 188 same file: $this->runnerCli is aSchedulerTestRunnerCli object. On line 62 of file ./src/spdx2/agent_tests/Functional/SchedulerTestRunnerCli.php in aSchedulerTestRunnerCli::run() you can see that retCode is the return of pclose.
Why are you sure it is a problem of changes made in spdx agent? |
(from discussion) @ChristopheRequillart actually, we are not sure. |
Tested, works in general, but not with two licenses and their comments. @ChristopheRequillart Would it be Ok, to change it a little to concatenate both strings maybe in a Example currently: -> only one comment |
adding to it: If there are multiple licenses, but only one of these has a comment, this one comment will be printed in any case (regardless it is a comment of the first lic in the list or the last) -> OK. |
I have a patch using SpdxTwoUtils::implodeLicenses() but it is |
Kindly rebase with origin master ( |
3e65d0e
to
2f83b8e
Compare
@ChristopheRequillart , just a minor thing: |
2f83b8e
to
aa242c7
Compare
hm, it seems like there is the same error for the tests ran:
|
Hello Michael, But I can’t get it when I run it.
|
But if I put an uploadId without data in uploadtree_a, I get it:
Is there a problem with $uploadId when Travis launch the test? |
Doesn’t seem the same problem when I call with an uploadId without data in uploadtree_a:
|
The error on SPDX test appears to be an issue with PHP itself. I tried to run it on Trusty Docker image with PHP 5.6 and it failed but with PHP 7.0 from ondrej PPA passed on the same container. It might get fixed after #1325 |
@GMishx |
aa242c7
to
0204ea6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
LicenseComment: NOCOMMENT | ||
{% else %} | ||
LicenseComments: <text>{{ licenseComment |replace({'<text>':'<text>','</text>':'</text>'}) | ||
|replace({'\f':''}) }} </text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is |e
missing, as used in https://github.com/fossology/fossology/pull/1267/files#diff-11fb262498a75525792bb019f78fe519R45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here LicenseComments follow the same logic as FileCopyrightText, just below. Why don’t keep this homogeneous?
a5dc1b2
to
aca09d6
Compare
Hello, Nicolas give me an idea to be more compliant with php 5.6. So I delete type declaration for parameter of methods. With this, some tests of Travis passed OK. Thanks Nicolas. I don’t understand the last error in Travis test. |
@ChristopheRequillart please consider the merge conflicts - every day makes it worse ... |
Thanks Michael, merge done. |
@ChristopheRequillart we usually solve conflicts by rebasing and then force pushing to the branch. This yields a simpler history. |
ae78945
to
610bc36
Compare
…name array in generateFileNodesByFiles() and create array correctly in getSPDXLicenseCommentState()
Co-Authored-By: ChristopheRequillart <[email protected]>
610bc36
to
38072e8
Compare
OK rebase & forced push done |
Hello, |
@ChristopheRequillart we have merge #1349 while trying to preserve your commit history. We thought it might be easier just to make some modifications. |
Description
Implement SPDX output does not yet show license comments
Changes
How to test
Activate the new option in Organize/Uploads/Edit Properties and launch an export SPDX.
closing #645