Conversation
The vendored Carthage/Checkouts/xcconfigs Base/Configurations/Debug.xcconfig
hardcodes OTHER_CODE_SIGN_FLAGS = --digest-algorithm=sha1 --timestamp=none
for every Debug build. Current codesign refuses SHA-1 outright:
error: signing with only SHA1 not allowed. Please remove `sha1`
from the `--digest-algorithm` code signing flag.
which was breaking ObjectiveGit-MacTests' CodeSign build phase (and
would break the ObjectiveGit-Mac framework and ObjectiveGit-iOS
target the same way, since they share the same project-level Debug
config).
Since Base/Configurations/Debug.xcconfig lives in a separate vendored
git submodule (jspahrsummers/xcconfigs) fetched fresh by
script/bootstrap on every CI run, patching it directly wouldn't
survive a bootstrap. Instead, override OTHER_CODE_SIGN_FLAGS directly
in the project's own Debug build configuration, which takes
precedence over the same key supplied by baseConfigurationReference.
Keeps --timestamp=none (skips the network-dependent Developer ID
timestamp server, still fine for local/CI ad-hoc signing) and just
drops the now-rejected --digest-algorithm=sha1.
The vendored xcconfig caps Mac targets at x86_64, which leaves the test target with nothing valid to build on Apple Silicon. - Override VALID_ARCHS with "x86_64 arm64" on all four test configurations, matching what the framework target already does. - Without it the target produces no binary and the build stops at "Build input file cannot be found" before compiling a single source file, so none of the errors behind it were ever visible.
git_buf dropped its asize member when libgit2 1.x moved the allocated size into reserved, so the NSData specs stopped compiling. - Read buffer.reserved instead. git_buf_grow still writes the allocation size there, so all three assertions keep the meaning they had against 0.28. - Leave the deprecated git_buf and git_strarray calls around them alone; they still resolve through deprecated.h, which carries no deprecation attribute, and removing them belongs with the rest of the shim cleanup.
Quick 7 turned the spec entry point into a class method, so self in a spec body is now the spec class rather than the example being run, and the fixture helpers are instance methods on QuickSpec. - Send the fixture helpers to QuickSpec.current, the instance XCTest is running, so each example still gets its own temp directory. - Give SwiftSpec the class-method signature so it overrides Quick's spec() again. Swift compiles first in a mixed target, so this one error hid every Objective-C error behind it. - Fourteen of these were hard errors. The rest compiled only because clang allows any known selector on a bare Class, and would have raised unrecognized selector at run time.
hannesa2
force-pushed
the
make-the-test-target-compile
branch
from
September 28, 2026 05:33
9a89e54 to
eba1380
Compare
Recent Xcode enables parallel test execution by default, running each
Quick Spec class's tests in its own process. All of those processes
share the same NSTemporaryDirectory() though, so they also share
rootTempDirectory and, within it, the cached clean_repository
directory that -setUpRepositoryFixtureIfNeeded: unzips fixtures.zip
into once and reuses across specs.
That caching checked for clean_repository's existence and unzipped
straight into it if missing. With two processes racing, one could see
the directory as soon as the other process created it (mkdir happens
before the archive's contents are fully extracted) and start copying
a fixture out of it before extraction reached that entry, e.g.:
Couldn't copy directory Error Domain=NSCocoaErrorDomain Code=260
"The file testrepo.git couldn't be opened because there is no
such file."
Fix this the same way as any other read-visible-before-fully-written
race: unzip into a private, uniquely named staging directory first,
then publish it under clean_repository with a single atomic rename
(-moveItemAtPath:toPath:error:). The shared name now only ever refers
to a fully extracted directory. If another process already published
clean_repository first, our move fails because the destination
exists; in that case just discard the redundant staging copy and
proceed, since the fixtures are already there.
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.
It's the same like #109 but rebased on #80 to run tests on CI