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

Please give us an option to tell cabal sdist explicitly that -O2 is okay #2796

Closed
ekmett opened this issue Aug 27, 2015 · 3 comments
Closed

Comments

@ekmett
Copy link
Member

ekmett commented Aug 27, 2015

There currently doesn't seem to be a way to tell cabal sdist to trust me about -O2.

This means it always returns 1.

Since it cries wolf I can't use it in automated tools as part of my testing process to validate more interesting parts of the tar ball are all present.

@23Skidoo
Copy link
Member

You mean ghc-options: -O2? IIUC, it's already supposed to work this way.

       -- | Like PackageDistSuspicious but will only display warnings
       -- rather than causing abnormal exit.
     | PackageDistSuspiciousWarn { explanation :: String }

So looks like a bug.

@sznurek
Copy link
Contributor

sznurek commented Oct 3, 2015

@ekmett Did you mean cabal check instead of cabal sdist? On my machine cabal sdist does not give any warnings. Anyway, cabal check ends with exit code 1, listing only -O2 warning.

@23Skidoo I am happy to work on this issue. Should I be assigned to it?

EDIT: Sorry, I ran wrong version of cabal executable. I cannot reproduce this bug:

sznurek@trampek : /tmp/test-cabal
[0] % cabal sdist
Distribution quality warnings:
'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
Building source dist for test-cabal-0.1.0.0...
Preprocessing executable 'test-cabal' for test-cabal-0.1.0.0...
Source tarball created: dist/test-cabal-0.1.0.0.tar.gz

sznurek@trampek : /tmp/test-cabal
[0] % echo $?
0

sznurek@trampek : /tmp/test-cabal
[0] % cabal --version
cabal-install version 1.22.2.0
using version 1.22.2.0 of the Cabal library 

@23Skidoo
Copy link
Member

23Skidoo commented Oct 4, 2015

Closing, since this apparently can't be reproduced.

@ekmett Feel free to reopen if you can provide a failing test case.

@23Skidoo 23Skidoo closed this as completed Oct 4, 2015
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

3 participants