Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
b793a114
Verified
Commit
b793a114
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Add changelog entry
parent
eabedbde
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
changelog.d/pr-7392
+44
-0
44 additions, 0 deletions
changelog.d/pr-7392
with
44 additions
and
0 deletions
changelog.d/pr-7392
0 → 100644
+
44
−
0
View file @
b793a114
synopsis: Prefer canonicalized path when guessing tools from GHC path
packages: Cabal
prs: #7392
issues: #7390
description: {
Motivation
----------
Often times, the user facing `ghc` binary is
symlinked by other forces, such as the package manager,
tooling like ghcup etc. As such, the naming convention
(version suffix in particular) may not align with the
assumptions made in Cabal and it may find an incorrect ghc-pkg.
See:
- https://github.com/haskell/cabal/issues/7390
- https://gitlab.haskell.org/ghc/ghc/-/issues/18807
- https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/73
Solution
--------
Guessing the ghc-pkg path is already a hack and will be solved
more appropriately in the future, see
- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4214
- https://gitlab.haskell.org/ghc/ghc/-/snippets/2710
These patches will solve the issue for future GHC versions.
As such, this patch provides a workaround for
older, already existing GHC versions by first always
following the symbolic link of the ghc binary (if it is one)
and prefering its target directory as the guess lookup
location.
Rationale
---------
The canonicalized path of the ghc binary usually points to the
bin/ directory unpacked from a bindist, which is less likely to be
tampered with by distributions and tools. As such, prefering the
canoncialized path should get us more robust results.
}
This diff is collapsed.
Click to expand it.
Julian Ospald
@maerwald
mentioned in commit
bb72f20e
·
3 years ago
mentioned in commit
bb72f20e
mentioned in commit bb72f20e3267890e2e90c19a1a80e4de79f9c32c
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment