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

Profiling with -Werror and GHC 8.2 is broken #3360

Closed
ndmitchell opened this issue Aug 17, 2017 · 4 comments
Closed

Profiling with -Werror and GHC 8.2 is broken #3360

ndmitchell opened this issue Aug 17, 2017 · 4 comments
Labels
Milestone

Comments

@ndmitchell
Copy link
Contributor

@ndmitchell ndmitchell commented Aug 17, 2017

Using Windows 64bit, Stack 1.5, if I create a stack file for the Shake package pointing at nightly-2017-08-17 (a GHC 8.2 nightly), then run:

stack build --executable-profiling --library-profiling --ghc-options=-Werror

I get the error:

Configuring shake-0.15.11...

<no location info>: error:
Failing due to -Werror.

on the commandline: warning:
    -auto-all is deprecated: Use -fprof-auto instead

on the commandline: warning:
    -caf-all is deprecated: Use -fprof-cafs instead

The cause is

, if boptsLibProfile bopts || boptsExeProfile bopts
. I suggest either using the new flags (if you only care about newer GHC's), or doing a GHC version test.

I tested this with Shake, but I believe the problem applies to all packages.

@mgsloan mgsloan added the type: bug label Aug 17, 2017
@mgsloan mgsloan added this to the P2: Should milestone Aug 17, 2017
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Aug 18, 2017

Thanks for reporting! Looks like these have been old flags even when it was implemented. From the latest docs

-fprof-auto was known as -auto-all prior to GHC 7.4.1.

And indeed, the earliest supported ghc, 7.8 has -prof-cafs as well: https://downloads.haskell.org/~ghc/7.8.1/docs/html/users_guide/flag-reference.html

So, no version check is needed.

@mgsloan mgsloan closed this Aug 18, 2017
@ndmitchell
Copy link
Contributor Author

@ndmitchell ndmitchell commented Aug 18, 2017

Did you intend to close this issue?

@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Aug 18, 2017

Oh yeah forgot to mention i pushed a fix to master e21bfd9

@ndmitchell
Copy link
Contributor Author

@ndmitchell ndmitchell commented Aug 18, 2017

Thanks!

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.