[GHC] #2521: Trailing colon on GHC_PACKAGE_PATH doesn't work with ghc-pkg.

GHC ghc-devs at haskell.org
Wed Nov 19 23:03:02 UTC 2014


#2521: Trailing colon on GHC_PACKAGE_PATH doesn't work with ghc-pkg.
-------------------------------------+---------------------------------
        Reporter:  cjs               |         Owner:  simonmar
            Type:  bug               |        Status:  closed
        Priority:  normal            |     Milestone:
       Component:  Compiler          |       Version:  6.8.3
      Resolution:  fixed             |      Keywords:
Operating System:  Unknown/Multiple  |  Architecture:  Unknown/Multiple
      Difficulty:  Unknown           |     Test Case:
-------------------------------------+---------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"6fc78fdfa1482a31ed7b586f20c9d7cb592ea944/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="6fc78fdfa1482a31ed7b586f20c9d7cb592ea944"
 Refactor: use System.FilePath.splitSearchPath

 Summary:
 To address #2521 ("Trailing colon on GHC_PACKAGE_PATH doesn't work with
 ghc-pkg"), we were using a custom version of splitSearchPath (e4f46f5de).
 This
 solution however caused issue #9698 ("GHC_PACKAGE_PATH should be more
 lenient
 for empty paths").

 This patch reverts back to System.FilePath.splitSearchPath (fixes #9698)
 and
 adresses (#2521) by testing for a trailing search path separators
 explicitly
 (instead of implicitly using empty search path elements).

 Empty paths are now allowed (ignored on Windows, interpreted as current
 directory on Posix systems), and trailing path separator still tack on the
 user and system package databases.

 Also update submodule filepath, which has a version of splitSearchPath
 which
 handles quotes in the same way as our custom version did.

 Test Plan:
 $ GHC_PACKAGE_PATH=/::/home: ./ghc-pkg list
 ...
 db stack: ["/",".","/home","<userdb>","<systemdb>"]
 ...

 Reviewers: austin

 Reviewed By: austin

 Subscribers: thomie, carter, simonmar

 Differential Revision: https://phabricator.haskell.org/D414

 GHC Trac Issues: #2521, #9698
 }}}

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


More information about the ghc-tickets mailing list