Opened 8 years ago

Last modified 5 months ago

#1853 new bug

hpc mix files for Main modules overwrite each other

Reported by: guest Owned by: AndyGill
Priority: lowest Milestone: 7.12.1
Component: Code Coverage Version: 6.8.1
Keywords: Cc: chris@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

I have several programs, and hence several files that define Main modules, in the same directory. I build each one with a ghc --make -o Progname. When The hpc mix files describing the compiled modules are dumped in .hpc, the current Main.mix overwrites any previous Main.mix. As a result, I can only get an hpc report from Progname.tix if Progname was the most recent binary to be compiled.

Change History (16)

comment:1 Changed 8 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to 6.10 branch

comment:2 Changed 8 years ago by AndyGill

  • Owner changed from andy@… to AndyGill
  • Status changed from new to assigned

comment:3 Changed 6 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:4 Changed 5 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:5 Changed 5 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:6 Changed 5 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:7 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:8 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:9 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:10 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:11 Changed 3 years ago by morabbin

  • Type of failure set to None/Unknown

Bump; was this looked at? Does it still happen?

comment:12 follow-up: Changed 2 years ago by andygill

This one is tricky to fix, because of a baked in assumption. If anyone wants to help, or if I can find a willing student, I can give guidance about how to fix it.

comment:13 Changed 13 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:14 Changed 7 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:15 Changed 7 months ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:16 in reply to: ↑ 12 Changed 5 months ago by thomie

Replying to andygill:

This one is tricky to fix, because of a baked in assumption. If anyone wants to help, or if I can find a willing student, I can give guidance about how to fix it.

@andygill. I am currently looking at hpc.

Do you think this issue is worth fixing? Multiple programs in the same directory can be nicely handled using -main-is. The following doesn't overwrite any .mix files:

$ cat ProgramA.hs
module ProgramA where
main = return ()

$ cat ProgramB.hs
module ProgramB where
main = return ()

$ ghc -fhpc -main-is ProgramA ProgramA
$ ghc -fhpc -main-is ProgramB ProgramB

$ ls .hpc
ProgramA.mix ProgramB.mix
Note: See TracTickets for help on using tickets.