Skip to content

Take the source-repository-packages of two tests from local git repositories - #12702

Open
ulysses4ever wants to merge 2 commits into
haskell:masterfrom
ulysses4ever:tests/local-git-repositories
Open

ulysses4ever wants to merge 2 commits into
haskell:masterfrom
ulysses4ever:tests/local-git-repositories

Conversation

@ulysses4ever

Copy link
Copy Markdown
Collaborator

Two cabal-testsuite tests cloned repositories from GitHub, so they failed whenever a CI runner could not reach github.com, as postCheckoutCommand did on #12627 (Could not resolve host: github.com):

  • postCheckoutCommand cloned all of haskell/bytestring;
  • NewBuild/CmdClean/CleanSourceRepositoryPackage cloned haskell-hvr/Only.

Each now makes a small package of its own a local git repository and takes it from there, as NewBuild/SourceRepositoryPackageShallowReference already did. Its two helpers, initGitRepo and fileUri, move to Test.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 with Failed to connect to github.com.


Template B: This PR does not modify behaviour or interface

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

🤖 Generated with Claude Code

https://claude.ai/code/session_0176vAefrw8jPKXdh9h1wKuj

…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

@Mikolaj Mikolaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try!

@mergify mergify Bot added the 1️⃣ more approval needed Set by Mergify: has one of the two required approvals label Dec 5, 2026

@philderbeast philderbeast left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mergify mergify Bot removed the 1️⃣ more approval needed Set by Mergify: has one of the two required approvals label Dec 5, 2026
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
@ulysses4ever

Copy link
Copy Markdown
Collaborator Author

Thanks! Done in c3a54f1: your two haddocks as suggested, and Note [Local source repositories in tests] next to them, which the two tests refer to. lint-notes from #12685 finds it defined once with four references.

@ulysses4ever ulysses4ever added the squash+merge me Tell Mergify Bot to squash-merge label Dec 5, 2026
@mergify mergify Bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Dec 5, 2026
@mergify mergify Bot added the queued label Dec 5, 2026
@mergify

mergify Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Testing · estimated merge 22:52 UTC

Waiting for

  • any of · required by GitHub branch protection:
    • check-neutral = Validate post job
    • check-skipped = Validate post job
    • check-success = Validate post job

So far

  • ✅ Entered the queue Sat 5 Dec, 20:51 · rule squash-merge · triggered by rule Put pull requests in the squash+merge queue
  • 🟠 Testing · draft #12705
11 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of · required by GitHub branch protection:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of · required by GitHub branch protection:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of · required by GitHub branch protection:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of · required by GitHub branch protection:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of · required by GitHub branch protection:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of · required by GitHub branch protection:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of · required by GitHub branch protection:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of · required by GitHub branch protection:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs
Queue rule squash-merge: all 16 queue conditions still met
  • -closed
  • -conflict
  • -draft
  • any of:
    • -mergify-configuration-changed
    • check-success = @mergify/Configuration changed
    • check-success = @mergify/Configuration has been deleted
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of · required by GitHub branch protection:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of · required by GitHub branch protection:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of · required by GitHub branch protection:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of · required by GitHub branch protection:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of · required by GitHub branch protection:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of · required by GitHub branch protection:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of · required by GitHub branch protection:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of · required by GitHub branch protection:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of · required by GitHub branch protection:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot mentioned this pull request Dec 5, 2026
42 of 87 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-assisted continuous-integration merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days priority: high 🔥 queued squash+merge me Tell Mergify Bot to squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants