[GHC] #15541: package environment files and the GHC API

GHC ghc-devs at haskell.org
Mon Aug 20 22:21:54 UTC 2018


#15541: package environment files and the GHC API
-------------------------------------+-------------------------------------
        Reporter:  lspitzner         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.6.1
       Component:  GHC API           |              Version:  8.4.3
      Resolution:                    |             Keywords:  package
                                     |  environment
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Documentation     |  Unknown/Multiple
  bug                                |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15513            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 The motivation for this design is that package environments should be
 transparent to the user, giving tooling a means of configuring GHC for a
 project without further user intervention. This is much the same way GHC
 will automatically look at the environment's global and user package
 databases. That being said, package environments are often much more
 transient and it's not hard to see how this might go wrong. I see a few
 ways forward here:

  * Rip the `interpretPackageEnv` call out of `setSessionDynFlags` (or
 rather, `initPackages`) and require API users to do this manually.
  * Add a flag to `setSessionDynFlags` specifying whether package
 environments should be respected
  * Keep the status quo but document it

 lspitzner, perhaps you have an opinion on what this interface should look
 like?

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15541#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list