Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc-prof-options changes not triggering rebuild #9585

Open
tirumaraiselvan opened this issue Jan 3, 2024 · 0 comments
Open

ghc-prof-options changes not triggering rebuild #9585

tirumaraiselvan opened this issue Jan 3, 2024 · 0 comments

Comments

@tirumaraiselvan
Copy link

tirumaraiselvan commented Jan 3, 2024

Describe the bug

ghc-prof-options in <package>.cabal does not take into account newer changes. Possibly related to #3891

To Reproduce

Suppose my package file is large.cabal with ghc-prof-options: -fno-prof-count-entries :

executable large
    main-is:          Main.hs
    build-depends:    
        base ^>=4.17.2.0,
    hs-source-dirs:   app
    default-language: Haskell2010
    ghc-prof-options: -fno-prof-count-entries
  1. Run this using: cabal run --enable-profiling large -- +RTS -p
  2. Note that the large.prof file will have all entries set to 0
  3. Change ghc-prof-options above to ghc-prof-options: -fprof-count-entries to force counting entries
  4. Run again using same command. Output (notice it doesn't recompile!):
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
 - large-0.1.0.0 (exe:large)  --enable-profiling (configuration changed)
Configuring executable 'large' for large-0.1.0.0..
Preprocessing executable 'large' for large-0.1.0.0..
Building executable 'large' for large-0.1.0.0..
  1. Note that the large.prof file will still have all entries set to 0. Not Expected
  2. Run cabal clean
  3. Run again using same command and note non-zero entries in large.prof.

Expected behavior

Code should be recompiled with up-to-date ghc-prof-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant