Skip to content

Default package name and all targets for REPL#11452

Merged
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:fix/repl-retarget
Mar 10, 2026
Merged

Default package name and all targets for REPL#11452
mergify[bot] merged 1 commit intohaskell:masterfrom
cabalism:fix/repl-retarget

Conversation

@philderbeast
Copy link
Collaborator

Fixes #11451. A follow on from #10684 that I closed because its changelog entry was already committed with #11237. This is the behaviour change of #10684 that was not included with #11237.

Uses existing tests. Some of these no longer fail if no target is supplied.


@philderbeast
Copy link
Collaborator Author

Relevant unresolved review comment from #10684.

Did you consider modifying validatedTargets, in particular the selectPackageTargets function? That seems likely to be more correct to me than this ad-hoc manipulation of target strings. #10684 (comment)

@philderbeast philderbeast force-pushed the fix/repl-retarget branch 5 times, most recently from 03507f5 to ca9dc9b Compare January 21, 2026 19:29
@philderbeast philderbeast marked this pull request as draft January 21, 2026 20:22
@philderbeast philderbeast force-pushed the fix/repl-retarget branch 4 times, most recently from 5667d09 to 047b4e3 Compare January 22, 2026 17:21
@philderbeast
Copy link
Collaborator Author

Did you consider modifying validatedTargets, in particular the selectPackageTargets function? That seems likely to be more correct to me than this ad-hoc manipulation of target strings. #10684 (comment)

@mpickering, can these be constructed as [TargetPackageNamed (mkPackageName pkg) Nothing] for the package target and [TargetAllPackages Nothing] for the all target?

@philderbeast philderbeast marked this pull request as ready for review January 22, 2026 20:20
@philderbeast philderbeast force-pushed the fix/repl-retarget branch 2 times, most recently from c472188 to 7226592 Compare January 23, 2026 01:19
@philderbeast philderbeast added the re: project-file Concerning cabal.project files label Feb 7, 2026
@philderbeast philderbeast force-pushed the fix/repl-retarget branch 3 times, most recently from c67bc93 to 3f1b6b4 Compare March 2, 2026 14:36
@philderbeast
Copy link
Collaborator Author

"Validate windows-latest ghc-9.2.8" seems quite flaky.

@geekosaur
Copy link
Collaborator

It's off and on failing in ghc-pkg.exe which silently exits with a failure status. Letting it sit a few hours and retrying usually works (when it starts happening, it keeps happening for 1-2 hours).

@philderbeast
Copy link
Collaborator Author

Thanks for the tip @geekosaur.

@philderbeast philderbeast added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Mar 4, 2026
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Mar 6, 2026
@philderbeast philderbeast force-pushed the fix/repl-retarget branch 3 times, most recently from 8de30b0 to 16d1a09 Compare March 6, 2026 21:02
- Show packages when no --project-file is given
- Handle the case with no packages in the project
- Add a changelog
- Add tests
- Satisfy hlint
- Satisfy fourmolu
- Don't need a target when there is one package
- Adjust target strings for sole package
- Add alt.project tests for ReplOptions
- Silence the 1st withCtx call's verbosity
- Don't repeat configuration is affected by
- Satisfy whitespace
- Fixups after rebase
- Remove punct variable
- Review comment changes
- Comma with but joining indep' clauses
- Use single package
- Update tests, adding more assertions
- Improve test descriptions
- Mention [package:][ctype:]component
- Don't repeat [package:][ctype:]component
- Lift validatedTargets, rename r as replFlags
- Don't use -XRecordWildCards for configFlags
- Add a one.project one pkg test
- Remove target string manipulation
- Make reportProjectNoTarget a function
- Redo ReplProjectTarget tests
- Redo ReplProjectNoneTarget tests
- Satisfy fix-whitespace
- Error whether or not project has packages
- Guard against triggering an assertion if targets are null
- Skip if Windows
- Repl commands mentioning the fake-package
- Don't yet automatically pick only choice
- Autopick the one package
- Split ReplProjectTarget test
- Add tests for repl all target
- Default target to all with multireplh
- Add a retargetting message
- Add test for default "all" target when multirepl
- Add type synonym TargetPick
- Add targetedRepl
- RejectNoTargets if target strings not null
- Guard against infinite retargeting & null pkgs
- Redo the changelog.
- Remove TargetPick type synonym
- Unfail REPL tests with default targets
- Update expected fake-package-0 message
- Lambda lift target resolutions
- Move only deps check
- Add type synonym, Repl t a
- type Repl is the same as TargetsAction
- Construct a TargetSelector directly
- Add ctxMulti, remove retargetMsg
- Expand haddocks of TargetResolver
- Bind resolveTarget
- Follow hlint suggestion: use maybe

Co-Authored-By: brandon s allbery kf8nh <allbery.b@gmail.com>
@philderbeast
Copy link
Collaborator Author

philderbeast commented Mar 9, 2026

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Mar 9, 2026

Merge Queue Status

  • Entered queue2026-03-10 11:49 UTC · Rule: default
  • Checks passed · in-place
  • Merged2026-03-10 12:00 UTC · at 6d5aac21035556d95b1e913d7d02efcfa03799f6

This pull request spent 10 minutes 41 seconds in the queue, with no time running CI.

Required conditions to merge
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Doctest Cabal
    • check-neutral = Doctest Cabal
    • check-skipped = Doctest Cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Meta checks
    • check-neutral = Meta checks
    • check-skipped = Meta checks
  • any of [🛡 GitHub branch protection]:
    • check-success = docs/readthedocs.org:cabal
    • check-neutral = docs/readthedocs.org:cabal
    • check-skipped = docs/readthedocs.org:cabal
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate post job
    • check-neutral = Validate post job
    • check-skipped = Validate post job
  • any of [🛡 GitHub branch protection]:
    • check-success = fourmolu
    • check-neutral = fourmolu
    • check-skipped = fourmolu
  • any of [🛡 GitHub branch protection]:
    • check-success = hlint
    • check-neutral = hlint
    • check-skipped = hlint
  • any of [🛡 GitHub branch protection]:
    • check-success = Bootstrap post job
    • check-neutral = Bootstrap post job
    • check-skipped = Bootstrap post job
  • any of [🛡 GitHub branch protection]:
    • check-success = whitespace
    • check-neutral = whitespace
    • check-skipped = whitespace
  • any of [🛡 GitHub branch protection]:
    • check-success = Check sdist post job
    • check-neutral = Check sdist post job
    • check-skipped = Check sdist post job
  • any of [🛡 GitHub branch protection]:
    • check-success = Changelogs
    • check-neutral = Changelogs
    • check-skipped = Changelogs

@mergify mergify bot added the queued label Mar 10, 2026
@mergify mergify bot merged commit 131fb0d into haskell:master Mar 10, 2026
87 of 95 checks passed
@mergify mergify bot removed the queued label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge re: project-file Concerning cabal.project files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default targets for REPL command with a project

3 participants