-
Notifications
You must be signed in to change notification settings - Fork 312
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
Android: Analyzer fails because Gradle cannot choose between multiple project variants #4694
Comments
A possible way to fix this would be to offer an optional Analyzer option to select the variant which should be analysed. |
A similar (package-manager-specific) option (in |
@sschuberth @MarcelBochtler Did you just enabled the Analyzer to use labels? Could we instead use a specific label keys to specify gradle variant/maven profile to analyze? |
Whatever mechanism we use, IMO it needs to be one that is configurable along with the project's source code. We could also allow to set labels in |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Previously, failures to look up remote artifacts were unconditionally cached as empty artifacts. While it is hard to reliably determine the root cause of a failed lookup, in the case that all candidate URLs do not end with a known extension it is very likely that ORT ran into a bug in the context of #4694. Ease debugging such cases by not anymore caching failed lookups due to missing file extensions, and generally improve the logging when returning an empty remote artifact. Signed-off-by: Sebastian Schuberth <[email protected]>
Previously, failures to look up remote artifacts were unconditionally cached as empty artifacts. While it is hard to reliably determine the root cause of a failed lookup, in the case that all candidate URLs do not end with a known extension it is very likely that ORT ran into a bug in the context of #4694. Ease debugging such cases by not anymore caching failed lookups due to missing file extensions, and generally improve the logging when returning an empty remote artifact. Signed-off-by: Sebastian Schuberth <[email protected]>
Previously, failures to look up remote artifacts were unconditionally cached as empty artifacts. While it is hard to reliably determine the root cause of a failed lookup, in the case that all candidate URLs do not end with a known extension it is very likely that ORT ran into a bug in the context of [1]. Ease debugging such cases by not anymore caching failed lookups due to missing file extensions, and generally improve the logging when returning an empty remote artifact. [1]: #4694 Signed-off-by: Sebastian Schuberth <[email protected]>
Previously, failures to look up remote artifacts were unconditionally cached as empty artifacts. While it is hard to reliably determine the root cause of a failed lookup, in the case that all candidate URLs do not end with a known extension it is very likely that ORT ran into a bug in the context of [1]. Ease debugging such cases by not anymore caching failed lookups due to missing file extensions, and generally improve the logging when returning an empty remote artifact. [1]: #4694 Signed-off-by: Sebastian Schuberth <[email protected]>
I just confirmed that the GradleInspector can successfully analyze https://github.com/owncloud/android, see the attached analyzer result. So this specific issue can be closed. |
@sschuberth after switching to the new Because the AndroidX Libraries are developed inside a big mono repo, you cannot match a specific library version against a revision inside the repository. The sources are provided as jars for each library version. Is it correct to add these information via the curations.yml file, to prevent failing source downloads? |
Also see #5105 in that context.
Correct.
That's not completely true, as you could leverage the ort/model/src/main/kotlin/VcsInfo.kt Lines 43 to 47 in 15e33b2
Yes, I'd probably curate author and concluded license, and enable the |
Using gradle-inspector will also not allow you to limit analysis to specified build variants for performance reasons; that would go against one of the fundamental principles of ORT to not "hide" information from the user. Instead, we always analyze everything, and later on allow to filter down information (e.g. via scope excludes and other means) to what is relevant in the respective context. However, if performance is such a big issue in your case, one could think about a feature that indeed really omits build variants (or scopes, as a more general term) from analysis, but clearly documents as part of the analyzer result what was not analyzed. If you're interested in such a feature, please file a new issue. |
When analysing a fairly large Android project, we often see issues with Gradle's dependency resolutions.
To reproduce:
Clone Owncloud's Android App: https://github.com/owncloud/android
Run the Analyzer:
ort --info --stacktrace analyze -i android/ -o android/ort/analyzer
This causes the Analyzer to produce the following error:
The text was updated successfully, but these errors were encountered: