-
Notifications
You must be signed in to change notification settings - Fork 843
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
Revisiting Stack's approach to ghc-pkg unregister
#6225
Comments
mpilgrem
added a commit
that referenced
this issue
Aug 30, 2023
The comment about -- We want to ignore the global and user databases.
-- Unfortunately, ghc-pkg doesn't take such arguments on the
-- command line. Instead, we'll set GHC_PACKAGE_PATH. See:
-- https://github.com/commercialhaskell/stack/issues/1146 was added by @snoyberg in 6b8fd22 on 12 Oct 2015, in response to #1146. At that time, the most recently released GHC was GHC 7.10.2 (on 29 July 2015). I do not know what versions of GHC/ |
mpilgrem
added a commit
that referenced
this issue
Sep 2, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 3, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 8, 2023
mpilgrem
added a commit
that referenced
this issue
Sep 13, 2023
Fix #6225 Avoid use of GHC_PACKAGE_PATH
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The context for revisiting Stack's current approach to
ghc-pkg unregister
is #5639. There are two aspects to that approach.1.
Stack.GhcPkg.unregisterGhcPkgIds
Stack.GhcPkg.unregisterGhcPkgIds
has (using the flag--user
):but
Stack.GhcPkg.ghcPkg
(not exported) has (usingpackageDbFlags pkgDbs
):where (using the flag
--no-user-package-db
)The
--no-user-package-db
ghc-pkg
flag makes the use of the--user
ghc-pkg
flag redundant, as GHC'sutils\ghc-pkg\Main.getPkgDatabases
has (from at least GHC 8.0.1) (extracts):2. In
Stack.Build.Execute.singleBuild
, usingGHC_PACKAGE_PATH
Stack.Build.Execute.singleBuild
has (extracts):but the Haskell comment about the functionality of
ghc-pkg
is not true (from at least GHC 8.0.1) -ghc-pkg --no-user-package-db --package-db=<db> unregister <P>
only operates on<db>
, there is no need to use the environment variable.Looking at the code in the GHC repository at tag
ghc-8.0.1-release
, inutils\ghc-pkg\Main.hs
, for example (extracts):modfiyPackage
getPkgDatabases
Alternatively, looking at the code in the
master
branch of the GHC repository (extracts):modifyPackage
getPkgDatabases
The text was updated successfully, but these errors were encountered: