When someone commits a single .rs file it doesn't have any pkg or refs sections because:
use statements are not parsed due to their complexity
Cargo.toml is not part of the commit
For example, committing https://github.com/matrix-org/matrix-rust-sdk/blob/master/matrix_sdk/src/client.rs generates matrix-org/matrix-rust-sdk/7772f89445b843a1b656bfcd9642776af2ae2094.report.
The use-part there is not easy to parse. Even if it was parsed, what should be included in the report? How many levels down?
An easier way may be to always grab Cargo.toml, get the list of dependencies and run through the file looking for matches. Any matching deps will be included in the contribution report.
This should only apply to some languages where imports are too hard to parse.
When someone commits a single .rs file it doesn't have any pkg or refs sections because:
usestatements are not parsed due to their complexityCargo.tomlis not part of the commitFor example, committing https://github.com/matrix-org/matrix-rust-sdk/blob/master/matrix_sdk/src/client.rs generates matrix-org/matrix-rust-sdk/7772f89445b843a1b656bfcd9642776af2ae2094.report.
The use-part there is not easy to parse. Even if it was parsed, what should be included in the report? How many levels down?
An easier way may be to always grab Cargo.toml, get the list of dependencies and run through the file looking for matches. Any matching deps will be included in the contribution report.
This should only apply to some languages where imports are too hard to parse.