-
-
Couldn't load subscription status.
- Fork 613
Fixes #4581: Failure to scan cargo #4582
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
base: develop
Are you sure you want to change the base?
Conversation
|
@AyanSinhaMahapatra review this please !! |
|
@AyanSinhaMahapatra sure I ll add the required test in the test suite !! |
|
@AyanSinhaMahapatra i added the test please review !!
here i used the same cargo.toml file this https://raw.githubusercontent.com/cesarb/constant_time_eq/refs/heads/main/Cargo.toml mentioned in the issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [dev-dependencies] | ||
| criterion = { version = "0.5.1", features = ["cargo_bench_support", "html_reports"] } | ||
| count_instructions = "0.2.0" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you shorten this test file by getting rid of everything below the dev-dependencies as we ignore this anyway as they are not useful info? We keep test files as small as possible to reduce repo size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AyanSinhaMahapatra yaa actually i followed the same cargo.toml which is in the issue also before adding i looked in other cargo.toml and there is features and everything so i just added this one without any type of annotation
will be making this shorter !!
b755a2f to
9c3b77f
Compare
Signed-off-by: Om Santosh Suneri <[email protected]>
Signed-off-by: Om Santosh Suneri <[email protected]>
Signed-off-by: Om Santosh Suneri <[email protected]>
Signed-off-by: Om Santosh Suneri <[email protected]>
9c3b77f to
b09b68b
Compare
Signed-off-by: Om Santosh Suneri <[email protected]>
|
@AyanSinhaMahapatra please review i had refactored the test and shortened the cargo.toml along with the full package scan cargo.toml.expected
|
tests/packagedcode/data/cargo/cargo_toml/single-file-scan/Cargo.toml.expected
Outdated
Show resolved
Hide resolved
Signed-off-by: Om Santosh Suneri <[email protected]>
3679f02 to
58e2e2b
Compare


Issue :
Fixes #4581
Changes made :
cargo.pyadded proper null check before accessing
.pathon parent resourceadded fallback to use
os.path.dirname(resource.path)when no parent existsnpm.pycode was calling .parent() twice instead of reusing the result
after making changes i passed the same cargo.toml file in the scancode and the error is resolved.
before changes result.json:
after changes result.json: