Skip to content
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

feat: Read project dependencies from cargo metadata #20

Merged
merged 10 commits into from
May 19, 2024
Merged

Conversation

AjithPanneerselvam
Copy link
Collaborator

@AjithPanneerselvam AjithPanneerselvam commented May 18, 2024

What does this PR offer?

  • Read project dependencies from cargo metadata, using crate cargo_metadata.
  • It's just a starting point where we are just checking if the override patch is one of the dependencies of the project.

Notes:

To pacify cargo manifest, forced to do the following in the test:

  • Used real crate (anyhow) in dependencies.
  • Added [[bin]] section in the cargo manifest.

Output:

./cargo-override --path ../anyhow
patch dependency 'anyhow' version requirement: '^1.0.81' found in project dependencies

@AjithPanneerselvam AjithPanneerselvam requested a review from eopb May 18, 2024 20:25
Copy link
Owner

@eopb eopb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so awesome!

I left some suggestions on some minor things

src/lib.rs Outdated Show resolved Hide resolved
tests/tests.rs Outdated Show resolved Hide resolved
tests/tests.rs Outdated Show resolved Hide resolved
tests/tests.rs Outdated Show resolved Hide resolved
AjithPanneerselvam and others added 4 commits May 19, 2024 09:30
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
@AjithPanneerselvam AjithPanneerselvam requested a review from eopb May 19, 2024 08:31
@eopb eopb merged commit e338456 into main May 19, 2024
6 checks passed
@eopb eopb deleted the feat-metadata branch May 19, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants