analyze: How to exclude dependencies when run analyze #11142
Replies: 9 comments 9 replies
|
@LizZhang315 - is the issue also reproducible if you analyze the directory instead of the file, e.g. with [1]? [1] |
|
@LizZhang315 can you confirm that the following reproduces the same issue?
I believe this to be a general issue with analyzing a single definition file instead of a directory (more common). In case the I wonder if it would make sense to adjust the documentation, to say that when analyzing a single file, there must not be references to other definition files in order for it to work. What do you think @oss-review-toolkit/core-devs ? |
I agree to that. |
If you use |
Yes.
Actually, https://git.sr.ht/~sbinet/gg works just fine for me.
There are means to deals with this, like package curations, but it seems this is not needed here. |
@fviernau If I run this cmd, the output is: But there has go.mod under "/Users/mac/IdeaProjects/myproject". And I set ort.analyzer.enabledPackageManagers=[GoMod]. ---- updated ---- |
@sschuberth Oh, but it doesn't works for me (T^T), so I will try to exclude it by package_curations. |
|
@sschuberth I have add curations in .ort.yml: but it still has this error: And also there has another error, ort will download module not exit, like "github.com/lyft/protoc-gen-validate", this module is dependent on the modules that our project relies on. Do I need to configured it in the curations to ignore it? But the GitHub address of this module is no longer accessible, will there still be an error when executing analyze? |
|
@LizZhang315, I've moved this to a discussion, as it seems to more usage help than an issue report. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Error1: run analyze in go project, go list output include my go project, and ort has a error:
java.lang.IllegalArgumentException: A replace directive references a module in '/Users/mac/IdeaProjects/myproject' outside of analysis root which is not supported.
Error2: run ort analyze in my project root dir with "-i /myproject/root/dir", ort will do nothing and has a log "No definition files found." But there has a "go.mod" file of my project.
Error3: run ort analyze will download module of indirect module dependencies, is it right? The module is "git.sr.ht/~sbinet/gg", and ort will request "https://git.sr.ht/~sbinet/gg" to download the code, but the website is no longer accessible. How can I exclude this module when run analyze?
To Reproduce
Steps to reproduce the behavior:
use ort-71.5.0
run cmd:
cd /Users/mac/IdeaProjects/myproject
ort -P ort.analyzer.allowDynamicVersions=true --debug --stacktrace analyze -i /Users/mac/IdeaProjects/myproject/go.mod -o /Users/mac/IdeaProjects/myproject/ort/ort-analyzer
Expected behavior
run success
Console / log output
Environment
Output of the
ort requirementscommand (ensure to remove any sensitive information manually):Or manually specify:
And specify (relevant parts of) your ORT configuration (
config.yml):Additional context
.ort.yml
All reactions