Stamp version.h from $SOLO5_VERSION for tarball pins - #642
Closed
samoht wants to merge 1 commit into
Closed
Conversation
gen_version_h.sh needs a version when .git is absent. Today the only fallback is
version.h.distrib from a `make distrib` release tarball; an opam tarball pin (or
any exported git snapshot) has neither a Git tree nor a .distrib, so the build
fails.
Add $SOLO5_VERSION as a third source, after git describe and version.h.distrib,
and pass it from the opam files as %{version}% so a tarball pin builds.
samoht
added a commit
to samoht/solo5
that referenced
this pull request
Jun 23, 2026
Carried so the macOS e2e can tar-pin solo5; the real change is Solo5#642. Drop once that lands.
Contributor
|
I struggle to understand why this is needed. Now given the amount of maintenance of solo5, I'm not very comfortable to add this much more compexity (in the shell script, as well as opam pushing through some environment variable) for which I don't understand the use case. Why can't you use a git pin or a released version? |
Author
|
The current issue is that solo5 breaks if you try tin pin install it from a tarball. I agree this is a narrow use-case and I'm fine to drop it if you don't think that's useful. |
Collaborator
It is, in fact, far too specific when other suitable solutions (such as pin a Git repository) are available and do not have the problem described here. |
Author
|
Fair. Thanks for reviewing this anyway! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gen_version_h.shneeds a version string when.gitis absent. Today the only fallback isversion.h.distrib, shipped in amake distribrelease tarball. An opam tarball pin (or any exported git snapshot, e.g. a GitHub codeload archive) has neither a Git tree nor aversion.h.distrib, so the build fails atgen_version_h.sh.This PR adds
$SOLO5_VERSIONas a third source, aftergit describeandversion.h.distrib, and passes it from the opam files as%{version}%. Soopam pin add solo5 <tarball>and an opam-repository release from a codeload archive both build without a Git tree.The macOS cross-build PR #641 carries this as a temporary commit so its CI can tar-pin solo5; that commit drops once this lands.