-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add Cargo package autodiscovery #1094
Conversation
Do you have example of queries that do no work?
|
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.
I made some comments and spot some breaking changes that should be avoided
I've update according to the review, I think the remaining items are:
|
I'll run some tests over the weekend |
* fix: Replace tab by space in generated yaml * fix: Switch back to `cargo generate-lockfile` as it updates the lock file without changing version constrains specified in Cargo.toml such as 1.0 * fix: test with the new target name
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@loispostula In my last commit, I disable updating the Cargo.toml if it's not strict semver. So 1.0.0 should be updated to >=1.0.0 while "1.0" should only update "Cargo.lock" by running I have mixed feeling about overidding version constraint in Cargo.toml (and I am open for discussion) |
👇 Click on the image for a new way to code review
Legend |
Implement cargo package auto-discovery
Dependson:
Support autodiscovery of crate specifying their version inline
Cargo dependencies can be specified in two ways:
or
Due to limitation in the current
toml
parsing capabilities, it's not possible to perform such complex queries on theCargo.toml
files. This means that autodiscovery will not work for dependencies not specifies using the full specTest
To test this pull request, you can run the following commands:
Additional Information
Tradeoff
Potential improvement
in dry-run mode shouldn't not change the file
Cargo.lock`