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

Enhance ResolveLicenseInfos to contain original SPDX expressions #3616

Conversation

MarcelBochtler
Copy link
Member

See commit messages for detailed information.

FYI: @KorSin, @neubs-bsi

Related to: #3396

@MarcelBochtler
Copy link
Member Author

licenseInfo: LicenseInfo within ResolvedLicenseInfo is no longer used.
But this information may be used in the rules.kts scripts. Removing it will result in a Breaking Change.

Once we introduce choices to the ResolvedLicenseInfo, not all licenses will remain in licenses: List<ResolvedLicense> of ResolvedLicenseInfo. Hence not all LicenseInfo would be available.

Should it be removed from ResolvedLicenseInfo?

/**
* The unresolved license info.
*/
val licenseInfo: LicenseInfo,

model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/main/kotlin/licenses/ResolvedLicenseInfo.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
model/src/main/kotlin/licenses/ResolvedLicenseInfo.kt Outdated Show resolved Hide resolved
model/src/test/kotlin/licenses/LicenseInfoResolverTest.kt Outdated Show resolved Hide resolved
@neubs-bsi neubs-bsi force-pushed the license-choice-resolved-license-info branch 2 times, most recently from e494f3d to 2fd32f5 Compare February 11, 2021 12:46
@MarcelBochtler MarcelBochtler force-pushed the license-choice-resolved-license-info branch from 2fd32f5 to fbac018 Compare February 11, 2021 15:01
@MarcelBochtler MarcelBochtler force-pushed the license-choice-resolved-license-info branch 5 times, most recently from 650bd56 to e470f08 Compare February 12, 2021 14:20
@neubs-bsi neubs-bsi force-pushed the license-choice-resolved-license-info branch 2 times, most recently from 8fbc6a6 to 2002102 Compare February 16, 2021 14:31
@MarcelBochtler MarcelBochtler force-pushed the license-choice-resolved-license-info branch 4 times, most recently from bd2ffa2 to 5a77418 Compare February 22, 2021 08:23
mnonnenmacher
mnonnenmacher previously approved these changes Feb 24, 2021
@neubs-bsi neubs-bsi requested a review from sschuberth February 24, 2021 14:20
@MarcelBochtler MarcelBochtler force-pushed the license-choice-resolved-license-info branch from 6bf49c1 to 163d080 Compare February 25, 2021 08:12
MarcelBochtler and others added 4 commits February 25, 2021 11:15
This is required to apply choices to the expression at a later point in
time.

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
Signed-off-by: Stephanie Neubauer <Stephanie.Neubauer@bosch.io>
Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
So far concluded licenses were not added to the ResolvedLicense with
the source 'CONCLUDED', since there could have been an information loss
with the SPDX operators.
In a future change the license choice will also be applied to the
concluded licenses and therefore concluded licenses with their original
expression have to be stored within ResolvedLicense.

Signed-off-by: Stephanie Neubauer <Stephanie.Neubauer@bosch.io>
Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
As the keys of the original expressions already contain the license
sources, the separate `sources` field is removed from the constructor.
The field itself is kept within `ResolvedLicense` because it is useful
in the API.

Signed-off-by: Marcel Bochtler <marcel.bochtler@bosch.io>
@MarcelBochtler MarcelBochtler force-pushed the license-choice-resolved-license-info branch from 163d080 to 478462a Compare February 25, 2021 10:15
@MarcelBochtler MarcelBochtler merged commit 72db653 into oss-review-toolkit:master Feb 25, 2021
@MarcelBochtler MarcelBochtler deleted the license-choice-resolved-license-info branch February 25, 2021 12:02
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.

4 participants