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

sensei chokes on -fdefer-typed-holes #21

Open
soenkehahn opened this issue May 16, 2015 · 4 comments
Open

sensei chokes on -fdefer-typed-holes #21

soenkehahn opened this issue May 16, 2015 · 4 comments

Comments

@soenkehahn
Copy link

Here's a script in a branch that demonstrates the bug: https://github.com/soenkehahn/quickcheck-demo/blob/sensei-bug/sensei-bug.sh

The error message is:

<interactive>: invalid argument `defer-typed-holes' for `--format'
Try `<interactive> --help' for more information.
*** Exception: ExitFailure 1
@sol
Copy link
Member

sol commented May 16, 2015

This happens because -f is also a valid hspec argument. I think you can disambiguate this by putting a -- at the back, or moving the flag before the module. Say

cabal exec -- sensei-web test/Spec.hs -fdefer-typed-holes --

or

cabal exec -- sensei-web -fdefer-typed-holes test/Spec.hs

should work.

Not sure what else we should do here, but at the very least we want a better error message.

@soenkehahn
Copy link
Author

I think -fwarn-no-name-shadowing works correctly though.

I wonder if it would be best to avoid any heuristic and just say that hspec arguments have to be passed after --, no exceptions. At least that behaviour would be very easy to understand and unsurprising.

@sol
Copy link
Member

sol commented May 22, 2015

@soenkehahn -fno-warn-name-shadowing also does not work, just tried.

@sol
Copy link
Member

sol commented May 22, 2015

I think our best bet is still to improve error messages, so that the user better understands what's going on and how he can do what he wants to do.

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

No branches or pull requests

2 participants