[GHC] #16392: In ghci, revertCAFs should be executed in the external interpreter when necessary
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I believe this bug was discovered and reported earlier here, https://mail.haskell.org/pipermail/ghc-devs/2018-June/015842.html. I stumbled upon this while tracking down a problem with ghci. To describe the problem, we call revertCAFs whenever we load modules in ghci so that they can be re-evaluated. This however, doesn't work as intended when use with `-fexternal-interpreter` because the CAFs of loaded modules actually live in the external interpreter process instead while `revertCAFs` only work for CAFs in the ghci process. To fix this, we should call revertCAFs in the external interpreter when it's used. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: => newcomer Comment: Good catch! Care to offer a patch? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * cc: osa1 (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by lolotp): @osa1, I’m working on a patch at the moment, it should hopefully be ready soon. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: lolotp Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/500 -------------------------------------+------------------------------------- Changes (by lolotp): * owner: (none) => lolotp * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/500 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#16392: In ghci, revertCAFs should be executed in the external interpreter when necessary -------------------------------------+------------------------------------- Reporter: lolotp | Owner: lolotp Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/500 -------------------------------------+------------------------------------- Comment (by Marge Bot <ben+marge-bot@…>): In [changeset:"7a68254a7284db5bf8f1fa82aba4a6825d8f050a/ghc" 7a68254a/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7a68254a7284db5bf8f1fa82aba4a6825d8f050a" Fix #16392: revertCAFs in external interpreter when necessary We revert CAFs when loading/adding modules in ghci (presumably to refresh execution states and to allow for object code to be unloaded from the runtime). However, with `-fexternal-interpreter` enabled, we are only doing it in the ghci process instead of the external interpreter process where the cafs are allocated and computed. This makes sure that revertCAFs is done in the appropriate process no matter if that flag is present or not. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16392#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC