Skip to content

Conversation

@XenoAmess
Copy link
Contributor

add 2 functions to LicenseCompareHelper

@goneall
Copy link
Member

goneall commented May 7, 2022

There is a possibility that one of the children licenses in a ConjunctiveLicenseSet is also a ConjunctiveLicenseSet. To cover this case, you'll need to recursively descend the entire tree of licenses.

There is a similar, but rarer corner case for DisjunctiveLicenseSets where the children all contain white or black list items.

@goneall
Copy link
Member

goneall commented May 7, 2022

Once other request - could this be implemented without the additional dependency? I'm trying to keep the dependencies to a minimum.

@XenoAmess
Copy link
Contributor Author

There is a possibility that one of the children licenses in a ConjunctiveLicenseSet is also a ConjunctiveLicenseSet. To cover this case, you'll need to recursively descend the entire tree of licenses.

@goneall

I think it is actually recursively now...

Can you provide some failing test cases? Thanks!

@XenoAmess
Copy link
Contributor Author

XenoAmess commented May 8, 2022

Once other request - could this be implemented without the additional dependency? I'm trying to keep the dependencies to a minimum.

@goneall

done.

@goneall
Copy link
Member

goneall commented May 8, 2022

I think it is actually recursively now...

Yes - you are correct. Sorry I missed that on my first review of the code.

@goneall
Copy link
Member

goneall commented May 8, 2022

Thanks @XenoAmess - Nice addition to the library!

@goneall goneall merged commit c4ac79b into spdx:master May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants