-
Notifications
You must be signed in to change notification settings - Fork 723
Backport #11232: cabal-install: do not pass the executable name to cabal external commands #11295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
6 tasks
geekosaur
reviewed
Nov 17, 2025
geekosaur
approved these changes
Nov 17, 2025
Collaborator
|
Oh ****, not again…. All the old ghcs are failing with that |
Collaborator
|
Rebase after #11296 goes in. A future PR will hopefully mitigate this better, but we need to get the release moving now. |
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)
Contributor
Author
✅ Branch has been successfully rebased |
395fbd2 to
0911481
Compare
Collaborator
|
@mergify refresh |
Contributor
Author
✅ Pull request refreshed |
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.
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:
Survey of tools that can be affected by this change: #11232 (comment)
Include the following checklist in your PR:
significance: significantin the changelog file.This is an automatic backport of pull request cabal-install: do not pass the executable name to cabal external commands #11232 done by Mergify.