[GHC] #14717: Hidden package hints no longer display
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This started as a mailing list thread: https://mail.haskell.org/pipermail /haskell-cafe/2018-January/128485.html. Dan Burton demonstrated a reproduction without any build tool. With GHC 8.0.2, when you try to use a module from a hidden package, you get an error message with a helpful hint to add the package to the build- depends. With GHC 8.2.2 (and I believe 8.2.1), it appears that this hint is no longer displayed. To demonstrate, I'll copy Dan's repro: {{{ $ cat Main.hs module Main where import Data.Map main = putStrLn "It compiles" $ ghc-pkg list containers /usr/local/Cellar/ghc/8.2.2/lib/ghc-8.2.2/package.conf.d containers-0.5.10.2 $ ghc --make -hide-all-packages -package base Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Main.hs:2:1: error: Could not find module ‘Data.Map’ Use -v to see a list of the files searched for. | 2 | import Data.Map | ^^^^^^^^^^^^^^^ $ ghc --make -hide-all-packages -package base -package containers Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o ) Linking Main ... }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hvr): I wouldn't call this a bug as IIRC this was a known side-effect of the Backpack patch, but I'm surprised it wasn't pointed out in the release notes for GHC 8.2.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: ezyang (added) Comment: OK.. but perhaps a description of //why// Backpack changed this behavior would be useful since, from the perspective of someone who isn't familiar with how this works, this seems like a significant regression in error message quality. Perhaps ezyang can shed some light on the matter. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by taylorfausak): Thanks for reporting this! I noticed this change in behavior but didn't think too much about it. It hasn't affected my day-to-day that much because I know which packages most modules I use come from. However it would be nice to get the old suggestion back. And since I don't see the old suggestion in this thread yet, here it is: {{{
cat Main.hs import Data.Map main = pure ()
stack --resolver ghc-8.0.2 exec -- ghc -hide-all-packages -package base Main.hs [1 of 1] Compiling Main ( Main.hs, Main.o )
Main.hs:1:1: error: Failed to load interface for ‘Data.Map’ It is a member of the hidden package ‘containers-0.5.7.1’. Use -v to see a list of the files searched for. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ezyang): I'd like to say that I didn't intentionally break this, but in 00b530d5402aaa37e4085ecdcae0ae54454736c1 I did update the expect files to remove the message. I'll look into fixing it. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ezyang): I know what the problem is. Patch coming. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4376 Wiki Page: | -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => patch * differential: => Phab:D4376 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4376 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed * milestone: => 8.6.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14717: Hidden package hints no longer display -------------------------------------+------------------------------------- Reporter: snoyberg | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4376 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"4c364402ad9edade698863a3684f395e737b9de2/ghc" 4c36440/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="4c364402ad9edade698863a3684f395e737b9de2" Restore 'It is a member of hidden package' message. See comment in Packages for more details. Fixes #14717. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: validate Reviewers: snoyberg, taylorfausak, bgamari Reviewed By: snoyberg, taylorfausak, bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14717 Differential Revision: https://phabricator.haskell.org/D4376 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14717#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC