[GHC] #11556: GHC recompiles unchanged hs-boot files

#11556: GHC recompiles unchanged hs-boot files -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Driver | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #11013, #10333 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- A.hs: {{{#!hs module A where import B f = someError }}} A.hs-boot: {{{#!hs module A where }}} B.hs: {{{#!hs module B where import {-# SOURCE #-} A }}} {{{ $ ghc-7.10.3 --make A.hs [1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot ) [2 of 3] Compiling B ( B.hs, B.o ) [3 of 3] Compiling A ( A.hs, A.o ) A.hs:5:5: Not in scope: ‘someError’ $ ghc-7.10.3 --make A.hs [1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot ) [3 of 3] Compiling A ( A.hs, A.o ) A.hs:5:5: Not in scope: ‘someError’ }}} Why does `ghc --make` recompile `B.hs-boot`? Note that recompilation avoidance does work when using `ghc -c`: {{{ $ ghc -c A.hs-boot compilation IS NOT required }}} (found while trying to reduce the testcase for #11532, which contains 644 .hs and 642 .hs-boot files) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11556 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11556: GHC recompiles unchanged hs-boot files -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Driver | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | driver/recomp002/recomp002 Blocked By: | Blocking: Related Tickets: #11013, #10333 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * testcase: => driver/recomp002/recomp002 Comment: Please tell me this is indeed a bug. For a testsuite testcase, append the following two lines to `testsuite/tests/driver/recomp002/Makefile`. {{{ touch W.hs '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make Q.hs }}} Only `W.hs` should get recompiled, not `W.hs-boot`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11556#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11556: GHC recompiles unchanged hs-boot files -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Driver | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | driver/recomp002/recomp002 Blocked By: | Blocking: Related Tickets: #11013, #10333 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ezyang): The underlying cause of this issue is, I believe, the same as #10333 (https://ghc.haskell.org/trac/ghc/ticket/10333#comment:2). Since `A.hi` is not successfully compiled, we will always consider `A.hi-boot` as unstable (and we'll report that it is modified). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11556#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC