Skip to content

Rust dependencies are missing from single file commits #7

@rimutaka

Description

@rimutaka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions