Skip to content
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

Fix for #54 doesn't handle ambiguous poms correctly #61

Open
pmonks opened this issue Jun 28, 2024 · 1 comment
Open

Fix for #54 doesn't handle ambiguous poms correctly #61

pmonks opened this issue Jun 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pmonks
Copy link
Owner

pmonks commented Jun 28, 2024

The fix for issue #54 unconditionally places an OR operator between all detected licenses from a pom.xml file, however there are cases where there is indeed ambiguity and the Maven conjunction rule cannot be applied. For example:

  <licenses>
    <license>
      <name>MIT/Apache</name>
    </license>
  </licenses>

should result in:

#{"Apache-2.0" "MIT"}

Furthermore there are complications in (probably exceptionally rare) cases where there might be multiple such ambiguous <license> blocks in the same pom.xml file - does that result in a combinatorial explosion in SPDX expressions? For example:

  <licenses>
    <license>
      <name>MIT/Apache</name>
    </license>
    <license>
      <name>BSD/GPL</name>
    </license>
  </licenses>

Should the result for this be:

#{"BSD-4-Clause OR MIT" "Apache-2.0 OR BSD-4-Clause" "GPL-3.0-only OR MIT" "Apache-2.0 OR GPL-3.0-only"}

?

@pmonks pmonks added the bug Something isn't working label Jul 2, 2024
@pmonks pmonks changed the title Fix for #54 doesn't handle ambiugous poms correctly Fix for #54 doesn't handle ambiguous poms correctly Jul 2, 2024
@pmonks
Copy link
Owner Author

pmonks commented Jul 2, 2024

To be clear I've only seen a few examples of the first case, and no examples of the second case, but right now lice-comb does the wrong thing in both cases.

Some examples of the first case:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant