Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 17, 2025

Previously the executable name of the external command was passed to external commands as the first argument.

This behaviour was adapated from cargo which does this because of reasons that are internal to rust that do not affect GHC Haskell, and are even orthogonal to patterns that see common use in Haskell.

Additionally, it complicates the 'simple' case which is what we should optimize for when building such a feature.

The previous use case (one executable that serves multiple external subcommands) is still possible by the following means:

  • using a wrapper around the executable
  • using a symlink and check argv[0] in the executable

Survey of tools that can be affected by this change: #11232 (comment)


Include the following checklist in your PR:

@geekosaur
Copy link
Collaborator

geekosaur commented Nov 17, 2025

Oh ****, not again…. All the old ghcs are failing with that GLIBCXX versioning error again.

@geekosaur
Copy link
Collaborator

geekosaur commented Nov 18, 2025

Rebase after #11296 goes in. A future PR will hopefully mitigate this better, but we need to get the release moving now.

@geekosaur
Copy link
Collaborator

@Mergifyio rebase

Previously the executable name of the external command was passed to external commands as the
first argument.

This behaviour was adapated from cargo which does this because of reasons that are internal
to rust that do not affect GHC Haskell, and are even orthogonal to patterns that see common use in
Haskell.

Additionally, it complicates the 'simple' case which is what we should optimize for when building
such a feature.

The previous use case (one executable that serves multiple external subcommands) is still possible
by the following means:
- using a wrapper around the executable
- using a symlink and check argv[0] in the executable

Additionally, the variable `$CABAL` that was set by `cabal-install` was renamed to `CABAL_EXTERNAL_CABAL_PATH`. This has two reasons:
1. it makes migration easier for users of the external command feature that were previously expecting the name of the executable
   to appear in `argv[1]`
2. it does not unnecessarily pollute the environment variable namespace as it turns out some other tools have been and are already
   using this name, historically

Resolves #10275

(cherry picked from commit 72c1ee4)
@mergify
Copy link
Contributor Author

mergify bot commented Nov 18, 2025

rebase

✅ Branch has been successfully rebased

@ulysses4ever
Copy link
Collaborator

@mergify refresh

@mergify
Copy link
Contributor Author

mergify bot commented Nov 18, 2025

refresh

✅ Pull request refreshed

@mergify mergify bot merged commit c6c2618 into 3.16 Nov 18, 2025
59 checks passed
@mergify mergify bot deleted the mergify/bp/3.16/pr-11232 branch November 18, 2025 11:05
@mergify mergify bot removed the queued label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport merge me Tell Mergify Bot to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants