-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix test_dependencies only checking dependency count #3298
Fix test_dependencies only checking dependency count #3298
Conversation
The version of dependencies though might still be a valid check because in most cases you don't want to end up using more than one version of the crate even if they're compatible. |
Oh this is a very good point, but should maybe go into a separate test that verifies that no different versions of the same dependency are used. From my understanding the point |
a90c327
to
a8a0159
Compare
That is correct, it was serving the purpose of not using multiple versions of the same crate indirectly though. From my understanding (which might be veeeeery outdated) if you have for example vm-memory v0.9.0 and vm-memory v0.10.0 then this will show up as a "new dependency" because vm-memory would be counted twice. In the end is better to make it explicit instead like you suggested. |
I just drafted such a test and interestingly enough it does not pass, even though we ran |
This allowed dependencies to be replaced without the test failing, as long as the overall number of lines in the dependencies.txt file was correct. Note that due to the use of pprint automatically wrapping lines at 80 characters, the file contained more lines than dependencies, making the check even more inaccurate (dependencies with long paths/git urls werevbroken up into multiple lines, leading to a leniency of two dependencies that could be added without the test failing). This commit changes to the to 1. fix the above issues 2. ignore dependency versions, and only care about their names (meaning updates to a dependency will not trigger the test) Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
a8a0159
to
4d4f5aa
Compare
Signed-off-by: Patrick Roy roypat@amazon.co.uk
Changes
This commit changes to the to
Reason
Only checking the number of dependencies allowed dependencies to be replaced without the test failing, as long as the overall number of lines in the dependencies.txt file was correct.
Note that due to the use of pprint automatically wrapping lines at 80 characters, the file contained more lines than dependencies, making the check even more inaccurate (dependencies with long paths/git urls werevbroken up into multiple lines, leading to a leniency of two dependencies that could be added without the test failing).
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.
PR Checklist
git commit -s
).unsafe
code is documented.CHANGELOG.md
.rust-vmm
.