Precedence should be preserved in the result. The joined expression should be: GPL AND (MIT OR Apache-2.0)
Observed:
Precedence is not preserved in the result. The observed result is GPL AND MIT OR Apache-2.0
Reproducing Steps:
In test case "creates expressions from license expressions" @service/test/summary/scancode.js, given new Set(['MIT OR Apache-2.0', 'GPL']), the expected joined expression should be GPL AND (MIT OR Apache-2.0)
Another test case is at "summarizes and ignore license_expression containing NOASSERTION in version 30.1.0 of ScanCode" @ service/test/providers/summary/scancode.js, the expected result.licensed.declared should be BSD-2-Clause AND (CC0-1.0 OR BSD-2-Clause).
Expected:
When joining license expressions with AND:
Precedence should be preserved in the result. The joined expression should be:
GPL AND (MIT OR Apache-2.0)
Observed:
Precedence is not preserved in the result. The observed result is
GPL AND MIT OR Apache-2.0
Reproducing Steps:
In test case "creates expressions from license expressions" @service/test/summary/scancode.js, given
new Set(['MIT OR Apache-2.0', 'GPL'])
, the expected joined expression should beGPL AND (MIT OR Apache-2.0)
Another test case is at "summarizes and ignore license_expression containing NOASSERTION in version 30.1.0 of ScanCode" @ service/test/providers/summary/scancode.js, the expected
result.licensed.declared
should beBSD-2-Clause AND (CC0-1.0 OR BSD-2-Clause)
.This relates to https://github.com/clearlydefined/service/pull/1056#discussion_r1527021349