Store ComponentId details
As far as GHC is concerned, installed package components ("units") are identified by an opaque ComponentId string provided by Cabal. But we don't want to display it to users (as it contains a hash) so GHC queries the database to retrieve some infos about the original source package (name, version, component name). This patch caches these infos in the ComponentId itself so that we don't need to provide DynFlags (which contains installed package informations) to print a ComponentId. In the future we want GHC to support several independent package states (e.g. for plugins and for target code), hence we need to avoid implicitly querying a single global package state.
parent
ef9c608e
No related branches found
No related tags found
Pipeline #17256 failed
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Driver/Backpack.hs 16 additions, 15 deletionscompiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Finder.hs 4 additions, 2 deletionscompiler/GHC/Driver/Finder.hs
- compiler/GHC/Driver/Main.hs 1 addition, 1 deletioncompiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Packages.hs 74 additions, 37 deletionscompiler/GHC/Driver/Packages.hs
- compiler/GHC/Driver/Packages.hs-boot 5 additions, 2 deletionscompiler/GHC/Driver/Packages.hs-boot
- compiler/GHC/Driver/Pipeline.hs 2 additions, 1 deletioncompiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs 6 additions, 5 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Driver/Types.hs 1 addition, 1 deletioncompiler/GHC/Driver/Types.hs
- compiler/GHC/Runtime/Linker.hs 2 additions, 1 deletioncompiler/GHC/Runtime/Linker.hs
- compiler/GHC/Types/Module.hs 36 additions, 17 deletionscompiler/GHC/Types/Module.hs
- compiler/GHC/Types/Module.hs-boot 1 addition, 2 deletionscompiler/GHC/Types/Module.hs-boot
- compiler/main/UnitInfo.hs 4 additions, 1 deletioncompiler/main/UnitInfo.hs
- compiler/typecheck/TcBackpack.hs 16 additions, 6 deletionscompiler/typecheck/TcBackpack.hs
- ghc/GHCi/UI.hs 2 additions, 1 deletionghc/GHCi/UI.hs
- ghc/Main.hs 3 additions, 3 deletionsghc/Main.hs
Loading