[GHC] #11798: Recompiling with -fhpc flag added does nothing

#11798: Recompiling with -fhpc flag added does nothing -------------------------------------+------------------------------------- Reporter: drathier | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: None/Unknown (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When you recompile without modifiying any source code, nothing happens, as expected. The file is already compiled, after all. If you then add the -fhpc flag, it still doesn't recompile, even though it now should generate .tix files. These files are now unexpectedly missing, until the source files are modified or the .o and .hi files are deleted, and the code is recompiled again with the -fhpc flag. reproduce: 1. compile program 2. compile program with -fhpc note: missing .tix file 3. delete .hi and .o files 4. compile program with -fhpc 5. success; .tix file is generated -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: 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 dfeuer): * type: bug => feature request * architecture: x86_64 (amd64) => Unknown/Multiple * milestone: => 8.4.1 Old description:
When you recompile without modifiying any source code, nothing happens, as expected. The file is already compiled, after all. If you then add the -fhpc flag, it still doesn't recompile, even though it now should generate .tix files. These files are now unexpectedly missing, until the source files are modified or the .o and .hi files are deleted, and the code is recompiled again with the -fhpc flag.
reproduce: 1. compile program 2. compile program with -fhpc note: missing .tix file 3. delete .hi and .o files 4. compile program with -fhpc 5. success; .tix file is generated
New description: When you recompile without modifying any source code, nothing happens, as expected. The file is already compiled, after all. If you then change compilation options, such as adding the `-fhpc` or `-O2` flag, it still doesn't recompile, even though the program might now be expected to behave or perform differently. Users can work around this using `-fforce-recomp`, but perhaps they shouldn't have to, or perhaps they should be warned that this may be necessary. One option might be to record "significant" compilation options in the `.hi` file, to determine whether they have changed in a way that suggests recompilation may be in order. -- Comment: The original ticket claimed this was a bug recompiling with `-fhpc`, but in fact this is the way GHC behaves with compilation option changes in general. I've taken the liberty of modifying the title and description and making this a feature request, because I think there's a reasonable feature request here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: 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 bgamari): Note that we already do something along these lines. See the `FlagChecker` module. However, it seems quite clear that the flags accounted for here are woefully incomplete. Patches welcome! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 7.10.3 Resolution: duplicate | Keywords: 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): * status: new => closed * resolution: => duplicate Comment: In fact, I believe this is an outright duplicate of #10923. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: 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 rwbarton): * status: closed => new * resolution: duplicate => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: patch Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3368 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * status: new => patch * differential: => Phab:D3368 Comment: Fixing the original issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11798: Explicit recompilation required to change compilation options
-------------------------------------+-------------------------------------
Reporter: drathier | Owner: (none)
Type: feature request | Status: patch
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3368
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11798: Explicit recompilation required to change compilation options -------------------------------------+------------------------------------- Reporter: drathier | Owner: (none) Type: feature request | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 7.10.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3368 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: I believe this is fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11798#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC