Skip to content

Consistently pass '--keep-temp-files' - #519

Merged
fendor merged 2 commits into
haskell:masterfrom
fendor:wip/fendor/fix-keep-temp-files-older-cabal
Jul 30, 2026
Merged

Consistently pass '--keep-temp-files'#519
fendor merged 2 commits into
haskell:masterfrom
fendor:wip/fendor/fix-keep-temp-files-older-cabal

Conversation

@fendor

@fendor fendor commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Decouples the rendering of the cabal arguments from the computation of
the actual arguments.

Allows us to have a central location where we decide whether we will use
'--keep-temp-files' and other arguments.

Clarify the fallback behaviour if a Cabal version doesn't support
'--with-repl'.
Additionally, check whether the Cabal version supports
'--keep-temp-files' and fall back to single component loading in this
case.

Add lib:Custom test for the current Cabal version.
Enable tests that now succeed due to the improved fallback behaviour.

@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch 2 times, most recently from 6e256db to 10762a6 Compare July 7, 2026 09:37
@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch from 10762a6 to 02aa54b Compare July 7, 2026 14:40
@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch 3 times, most recently from 9ca1286 to 6fe58f5 Compare July 29, 2026 11:10
@fendor fendor changed the title WIP: Add test case for multi-repl and custom Cabal version Consistently pass '--keep-temp-files' Jul 29, 2026
@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch 4 times, most recently from 2e7d012 to 8e2d89b Compare July 29, 2026 14:25
@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch 3 times, most recently from 14426c7 to d0d5a3e Compare July 30, 2026 11:54
Decouples the rendering of the cabal arguments from the computation of
the actual arguments.

Allows us to have a central location where we decide whether we will use
'--keep-temp-files' and other arguments.
We pass '--keep-temp-files' to cabal even with single target mode, if the
top-level arguments are passed via a response file.

Clarify the fallback behaviour if a Cabal version doesn't support
'--with-repl'.
Additionally, check whether the Cabal version supports
'--keep-temp-files' and fall back to single component loading in this
case.
Thus, in the worst case, when custom packages in the repl closure, we
try load it three times. However, still better in the average case. We
simply consider the `build-type: Custom` cabal nodes as not recommended.

Add lib:Custom test for the current Cabal version.
Enable tests that now succeed due to the improved fallback behaviour.
Mark tests as expected failures for cabal 3.18.
@fendor
fendor force-pushed the wip/fendor/fix-keep-temp-files-older-cabal branch from d0d5a3e to b2cb873 Compare July 30, 2026 12:58
@fendor
fendor merged commit 9ff7f05 into haskell:master Jul 30, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant