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

Dependency mismatch corrections #118

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions utils/dependency_cross_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ def main(argv=[], prog_name=''):
parsec_tool_flags = '--all-features -d'

if args.compare:
# Versions should be sorted!
exceptions = {
'bindgen': ['v0.66.1', 'v0.57.0'],
'bindgen': ['v0.66.1'],
'cexpr': ['v0.6.0'],
}
parsec_repo, parsec_tool_repo = args.deps_dir
parsec_flags = '--all-features' + ' '
parsec_flags = '--features tss-esapi/generate-bindings,cryptoki/generate-bindings -d'
parsec_flags += '--features tss-esapi/generate-bindings,cryptoki/generate-bindings -d'
mismatches_parsec = run_deps_mismatcher(run_cargo_tree(parsec_repo, parsec_flags))
mismatches_parsec_tool = run_deps_mismatcher(run_cargo_tree(parsec_tool_repo,
parsec_tool_flags)
Expand All @@ -79,10 +81,11 @@ def main(argv=[], prog_name=''):
common_deps = list(set(mismatches_parsec.keys()) & set(mismatches_parsec_tool.keys()))
for dep in common_deps:
# Symmetric difference of repos parsec_repo and parsec_tool_repo
mistmatch = list(set(mismatches_parsec[dep]) ^ set(mismatches_parsec_tool[dep]))
mistmatch = sorted(set(mismatches_parsec[dep]) ^ set(mismatches_parsec_tool[dep]))
if len(mistmatch) > 0:
mismatches[dep] = mistmatch
else:
# Versions should be sorted!
exceptions = {
'base64': ['v0.13.1', 'v0.21.4'],
'bitflags': ['v1.3.2', 'v2.4.1'],
Expand All @@ -91,8 +94,7 @@ def main(argv=[], prog_name=''):
'yasna': ['v0.4.0', 'v0.5.2'],
}
mismatches = run_deps_mismatcher(run_cargo_tree(args.deps_dir[0], parsec_tool_flags))

mismatches = get_deps_with_more_than_1v(mismatches)
mismatches = get_deps_with_more_than_1v(mismatches)

print('---------------------exceptions-----------------------\n\n')
print_deps(exceptions)
Expand Down
Loading