-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Replace commit_hash.txt
with git archive placeholders (and try also replacing prerelease.txt
)
#9720
Comments
I think we should also document the mechanism in the docs as a part of this task. It will become less necessary to do this manually but the mechanism is still not obvious and we should have a place with an explanation to point people to. |
The script that currently generates these files (and the source tarball) is |
Apparently there's an additional use case not mentioned in the issue description:
Do we want that as a part of this too? I assumed it's only about github's source packages and that we're just going to keep the current system outside of that usage. If we do want |
Here's what I think we should do for this issue:
|
So after extensive discussion with @cameel I think we arrived at the following conclusion regarding the prerelease logic:
Additionally, we want to provide cmake options to override this default behaviour:
When it's done:
EDIT by @cameel: Updated with my suggestions from the chat. |
The |
Note that we will also need to check all release-related scripts and change them for towards the new mechanism. |
We also need to decide if we want to drop the old source archive and make the script just a wrapper over |
If we're not fine with not having dependencies in the source archive, we can drop the entire idea, because there's no way to achieve that with |
Even if we don't drop the other archive I think there's still some value in the default one being somewhat usable. |
I'm fine with removing the jsoncpp source |
I'm somehow wondering whether we could achieve this without having any magic files like |
In general I think that there must be an easy way to use those source tarballs. That means all dependencies should be either included (I think it's not possible, e.g. to always include all boost stuff), or a t least listed in a format, so that an enduser can automatically install them. Maybe we could use something like |
Unfortunately the automatically created source archive is not usable without this mechanism. Having this file is the only way we came up with so far to have the source result in a release build automatically. This is because
If they're missing, they get downloaded automatically by cmake. See
There's an ongoing discussion on this: #8860 (comment). No consensus so far though. Last time I asked, @chriseth was not convinced that introducing such a system for managing dependencies is an improvement over just keeping dependencies to a minimum. And others have varied opinions. |
Ah that's true! Somehow I forgot that we have still our build system present in the tarball ;) However, I think we don't really have boost managed, and also not z3, right? Both depend on the version installed on the system. I think it would be great to have those also managed by us. I think that would be a point for moving forward with something like |
Right, boost is a major pain. Personally, I'd be fine with something like |
We discussed the PR today on the chat. Here's a summary of what we agreed on:
|
Note that |
Just in case it helps: I had some local snippets yesterday to see how to robustly check, if we're on a tag and ended up with this:
Not sure that's the best way to do it, but maybe it helps as a basis. |
We should also consider removing |
The github source archives are invalid in that they are lacking proper
commit_hash.txt
andprerelease.txt
files and we instead have to manually pack another source archive, which is confusing and error-prone.The github source archive is created with
git archive
and https://git-scm.com/docs/gitattributes#_export_subst would allow us to create acommit_hash.txt
file with one of the placeholders like https://git-scm.com/docs/git-log#Documentation/git-log.txt-emHemThen our build scripts could check if the
commit_hash.txt
contains that placeholder and assume it's a git checkout and determine the hash usinggit
and otherwise assume it's a release archive and thatcommit_hash.txt
contains the proper commit hash.prerelease.txt
could be replaced for example by inspecting the top of the changelog - or maybe https://git-scm.com/docs/git-log#Documentation/git-log.txt-emdem can be used to check for tags in the decorators.The text was updated successfully, but these errors were encountered: