-
Notifications
You must be signed in to change notification settings - Fork 84
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
Remove duplicated CBMC Viewer version string #2314
base: main
Are you sure you want to change the base?
Conversation
This ensures that the version string does not need to be updated in two places, either manually or via a release script.
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.
Thanks!
@@ -1,4 +1,7 @@ | |||
CBMC_VERSION="5.79.0" | |||
# If you update this version number, remember to bump it in `src/setup.rs` too | |||
CBMC_VIEWER_VERSION="3.8" | |||
CBMC_VIEWER_VERSION=$( |
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.
We wanted to use kani-dependencies
as the single source of truth for versions of dependencies, so I would rather keep the version explicit here and instead update src/setup.rs
to read the version from this file.
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.
Thanks for catching that.
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.
@zhassan-aws as part of @jaisnan's release script work, we will also need to store the GitHub repositories of each of these tools somewhere. It would be nice not to have to store them in two different places.
Can I suggest that we convert this file into JSON? The file is only ever used from the various install_*.sh
scripts that run in CI. Thus, we could continue to read the versions if the CI has jq
available. My proposal is to write the file like this:
{
"CBMC_VIEWER": {
"version": "3.8",
"url": "https://github.com/model-checking/cbmc-viewer",
}
}
Then install_cbmc.sh
would do
CBMC_VERSION=$(jq -e CBMC.version < kani-dependencies.json)
and setup.rs
would also parse the file with a JSON parser to find the CBMC Viewer version.
What do you think?
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.
Converting it to a JSON file is definitely a good idea.
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.
Actually, I don't understand why we want JSON here.
This ensures that the version string does not need to be updated in two places, either manually or via a release script.
Testing:
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.