Repository navigation
Take the source-repository-packages of two tests from local git repositories - #12702
Open
ulysses4ever wants to merge 2 commits into
Open
ulysses4ever wants to merge 2 commits into
ulysses4ever wants to merge 2 commits into
Conversation
…itories
postCheckoutCommand cloned all of haskell/bytestring from GitHub, and
NewBuild/CmdClean/CleanSourceRepositoryPackage cloned haskell-hvr/Only,
so both failed whenever the CI runner could not reach github.com, as in
fatal: unable to access 'https://github.com/haskell/bytestring/': Could not resolve host: github.com
Each now makes a small package of its own directory a git repository and
takes it from there with a file:// URI, as
NewBuild/SourceRepositoryPackageShallowReference already did. The two
helpers this needs, initGitRepo and fileUri, move to Test.Cabal.Prelude;
the latter is the one that test defined for itself. The recorded
output of the two tests does not change: it never named the repository.
CleanSourceRepositoryPackage still exercises haskell#10182, as the objects git
writes in a local clone are read-only too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj
philderbeast
approved these changes
Dec 5, 2026
Collaborator
There was a problem hiding this comment.
Could you tie the use of initGitRepo with fileUri together for use with a source-repository-package in a separate note?
Also see #12685 where I'm asking we bring over lint-notes.
BTW, I restarted the failed validate jobs.
As asked in review: the haddocks of initGitRepo and fileUri now only say what each does, and Note [Local source repositories in tests] says how a test uses the two together for a source-repository-package, and why the location is a file:// URI. The two tests that do this refer to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj
Collaborator
Author
Contributor
🟠 Testing · estimated merge 22:52 UTCWaiting for
So far
11 merge conditions met
Queue rule
|
42 of 87 tasks
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.
Two cabal-testsuite tests cloned repositories from GitHub, so they failed whenever a CI runner could not reach github.com, as
postCheckoutCommanddid on #12627 (Could not resolve host: github.com):postCheckoutCommandcloned all ofhaskell/bytestring;NewBuild/CmdClean/CleanSourceRepositoryPackageclonedhaskell-hvr/Only.Each now makes a small package of its own a local git repository and takes it from there, as
NewBuild/SourceRepositoryPackageShallowReferencealready did. Its two helpers,initGitRepoandfileUri, move toTest.Cabal.Prelude. The recorded output does not change.Checked locally: the three tests pass, and they pass with the network cut off (
unshare -rn), where master's versions of the two tests fail withFailed to connect to github.com.Template B: This PR does not modify behaviour or interface
🤖 Generated with Claude Code
https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj