Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

ORT Downloader: Update ORT dependency to match latest ORT Analyzer output #632

Open
1 task
andreaslarfors opened this issue Nov 13, 2020 · 1 comment
Open
1 task
Labels
bug Something isn't working

Comments

@andreaslarfors
Copy link
Contributor

Summary of the Bug

It is not currently possible to use analyzer_result.yml files from the latest version of ORT as input to Antenna with the ORT Downloader enabled.
When updating the ort.rev value in pom.xml to any recent commit values, we get compilation errors:

2020-11-13T13:56:35.9752136Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project runtime: Compilation failure: Compilation failure: 
2020-11-13T13:56:35.9753046Z [ERROR] /usr/local/src/antenna/core/runtime/src/main/java/org/eclipse/sw360/antenna/util/LicenseSupport.java:[102,50] error: cannot find symbol
2020-11-13T13:56:35.9753528Z [ERROR]   symbol:   method component1()
2020-11-13T13:56:35.9753877Z [ERROR]   location: variable spdxLicenseIdExpression of type SpdxLicenseIdExpression
2020-11-13T13:56:35.9754417Z [ERROR] /usr/local/src/antenna/core/runtime/src/main/java/org/eclipse/sw360/antenna/util/LicenseSupport.java:[103,51] error: cannot find symbol
2020-11-13T13:56:35.9754867Z [ERROR]   symbol:   method component2()
2020-11-13T13:56:35.9755228Z [ERROR]   location: variable spdxLicenseIdExpression of type SpdxLicenseIdExpression
2020-11-13T13:56:35.9755763Z [ERROR] /usr/local/src/antenna/core/runtime/src/main/java/org/eclipse/sw360/antenna/util/LicenseSupport.java:[113,58] error: cannot find symbol
2020-11-13T13:56:35.9756206Z [ERROR]   symbol:   method component1()
2020-11-13T13:56:35.9756562Z [ERROR]   location: variable spdxCompoundExpression of type SpdxCompoundExpression
2020-11-13T13:56:35.9757177Z [ERROR] /usr/local/src/antenna/core/runtime/src/main/java/org/eclipse/sw360/antenna/util/LicenseSupport.java:[114,60] error: cannot find symbol
2020-11-13T13:56:35.9757624Z [ERROR]   symbol:   method component2()
2020-11-13T13:56:35.9757968Z [ERROR]   location: variable spdxCompoundExpression of type SpdxCompoundExpression

This is due to the refactoring of the Kotlin code in ORT: oss-review-toolkit/ort@67db194
From data classes to regular classes, which no longer support the component1(), component2(), component3() methods.
We also cannot access the fields from Java because the @JvmField has not been used so the fields are private to Java.

The core/runtime/.../antenna/util/LicenseSupport.java logic needs to be updated.

Steps to reproduce

  • Use the latest version of ORT Analyzer to generate a analyzer_result.yml file
  • Use the analyzer_result.yml as input file to Antenna
  • Enable the ORT Downloader
  • Antenna (ORT Downloader) will fail due to not recognizing fields 'processors' which was added to ORT Analyzer output.

Acceptance Criteria

  • Latest version of ORT Analyzer can be used as input for Antenna to update SW360.

Definition of Done

  • Acceptance criteria fulfilled
  • A test case is created to reproduce the bug
  • A PR is created, the CI infrastructure reports green, the bug test case proves that bug is fixed
  • The PR is reviewed and approved
  • No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue
  • Documentation is updated
@andreaslarfors andreaslarfors added the bug Something isn't working label Nov 13, 2020
@sschuberth
Copy link
Contributor

Thanks for the report @andreaslarfors. We're currently looking at ways to stop this mix between Antenna and the ORT Analyzer altogether. May I ask what you use-case for using Antenna is? Specifically, would you still need to use Antenna if oss-review-toolkit/ort#3313 was implemented?

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

No branches or pull requests

2 participants