Closed uint closed 3 years ago
The build script doesn't distinguish between test builds and other builds. It will unpack the archive even if we're not running any tests. Any errors there will stop the build.
I thought we might have been able to use:
if cfg!(test) {
unpack
println!
}
But it seems like the build.rs
file doesn't know about cargo test
being run and so it never fires. Not a big deal anyway since it'll only run once unless the tar file is changed. If it fails the person won't be able to run the tests which would be bad anyway and they should report an issue.
I'm in favour of this! What would the rest of the work look like? :)
Oh, I was referring to actually reorganizing the tests - as you wanted to in #176. No idea yet!
Rebased and added sign-offs.
This is part of the work for #176, but not all of it. It's just my proposal! We can scrap it if it doesn't work for you.
How it works
git-platinum
is now kept as a tarball indata/git-platinum.tgz
. All the necessary refs are in there already. There's abuild.rs
script that extracts the archive intodata/git-platinum
, which is ignored by git (git doesn't like nested repos, so we don't want to try checking it in).Updating
git-platinum
There's a script for that -
scripts/update-git-platinum.sh
. It will fetch the newest version of git-platinum, add the necessary refs, then update and commit the archive.The big win
It should now be possible to simply
git clone
the repo and runcargo test
without extra setup necessary, keeping it simple for future contributors. Also no more submodules.Drawbacks
flate2
andtar
.