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

skip reinstillation of twoliter from source #3479

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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
4 changes: 4 additions & 0 deletions tools/install-twoliter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ on_exit "rm -rf ${workdir}"

if [ "${reuse_existing}" = "true" ] ; then
if [ -x "${dir}/twoliter" ] ; then
if [ "${allow_bin}" != "true" ]; then
echo "Twoliter binary found and --allow-binary-install is false. Skipping install."
exit 0
Comment on lines +113 to +115
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't agree with this change and would like to see it reverted.

The version check is pretty important as otherwise there's no guarantee that the build will happen with the pinned version rather than whatever happens to be present. This potentially affects the correctness of any build where the binary is not available and the source build must be used, which can happen for other reasons than a developer working locally on twoliter.

It might be better for the twoliter version to not include the Git SHA, or to allow the path to the binary to be overridden (e.g. to ~/twoliter/target/release/twoliter) and skip the version check if the override is set - with a loud warning that the override is preventing the version check.

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case the sha is not going to match the version output from Twoliter --version.

❯ ./tools/twoliter/twoliter -V
twoliter 0.0.3

I don't understand what sha we are or aren't matching since twoliter -V doesn't print a SHA.

fi
version_output="$("${dir}/twoliter" --version)"
found_version=v$(echo $version_output | awk '{print $2}')
echo "Found twoliter ${found_version} installed."
Expand Down