Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,872
    • Issues 4,872
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1839
Closed
Open
Created Nov 06, 2007 by duncan@trac-duncan

need ghc-pkg dump feature

Cabal already needs quite a bit of information from ghc-pkg about the package database. In the future we would like even more information. It would be more efficient for Cabal to ask ghc-pkg once for all the information rather than to ask lots of little questions. (ghc-pkg is quite slow when lots of packages are registered)

For each package we want to know it's name, version, what packages it depends on, any C flags or include dirs, the exposed modules, the haddock html & interface dir.

We also need to be able to ask this information for a specific package database and get results for only that db. This is because Cabal needs to distinguish global and user packages. In future when we want to build several packages inplace we'll also want to use specific inplace package dbs.

So a dump command should probably just describe every package in a specified db. We already know how to parse an InstalledPackageDescription which is the format that ghc-pkg describe produces. One potential problem is distinguishing package boundaries if all the package descriptions are concatenated. Perhaps something simple like a blank line would suffice.

So here's a concrete suggestion:

ghc-pkg dump --global

should produce the concatenation (with blank line separators) of ghc-pkg describe for each package in the global package db. Note that is should list only those packages in the global db, not those from the user db.

ghc-pkg dump --user
ghc-pkg dump --package-conf=foo.package.conf

So these should do similarly, but act only upon the specified package dbs.

Trac metadata
Trac field Value
Version 6.8.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking