-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When possible, use package-id arg to ghc/runghc
Current mechanism of using GHC_PACKAGE_PATH for runghc and ghc commands does not seem to work well when we have multiple versions of the same package. GHC does not always pick up the packages in the same order as GHC_PACKAGE_PATH. This fix determines the package-ids using ghc-pkg and then passes package-ids on command line of ghc or runghc invocation. This works only when the user explicitly passes --package to runghc or ghc commands. When --package is not specified we have no easy way to determine what all packages will be used by the file being compiled. This will make sure that scripts which explicitly list all packages will always run reliably even in presence of packages which have multiple instances of the same version or multiple versions installed. fixes #1957 (Requires all packages to be listed explicitly)
- Loading branch information
1 parent
da1c53e
commit 1aecd68
Showing
2 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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