Skip to content

Vet --os and --arch args and improve error messages for bad inputs #2288

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

Closed
sjakobi opened this issue Jun 19, 2016 · 3 comments
Closed

Vet --os and --arch args and improve error messages for bad inputs #2288

sjakobi opened this issue Jun 19, 2016 · 3 comments

Comments

@sjakobi
Copy link
Member

sjakobi commented Jun 19, 2016

~/s/path (master) $ stack test --os foo
Compiler version mismatched, found ghc-7.6.3 (x86_64), but expected minor version match with ghc-7.10.3 (x86_64) (based on resolver setting in /home/simon/src/path/stack.yaml).
Try running "stack setup" to install the correct GHC into /home/simon/.stack/programs/x86_64-foo/
~/s/path (master) $ stack test --arch foo
Compiler version mismatched, found ghc-7.6.3 (x86_64), but expected minor version match with ghc-7.10.3 (foo) (based on resolver setting in /home/simon/src/path/stack.yaml).
Try running "stack setup" to install the correct GHC into /home/simon/.stack/programs/foo-linux/
~/s/stack (master) $ stack --version
Version 1.1.3, Git revision 11f225d126b6ec3cd56d7d45e830540ee82dca4f (dirty) (3720 commits) x86_64 hpack-0.14.1

The error message for --os foo is rather unhelpful. I'm also not sure why it chose this system-installed ghc-7.6.3?

Also it would be good to emit a warning when the OtherOS or OtherArch constructors are used (see Cabal haddocks.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 24, 2016

Gnarly, good catch!

@sjakobi
Copy link
Member Author

sjakobi commented Jul 18, 2016

It would probably be better to address #2227 before any work is invested in "improving" --os.

mgsloan added a commit that referenced this issue Mar 19, 2017
@mgsloan
Copy link
Contributor

mgsloan commented Mar 19, 2017

Fixed for --arch, says:

Warning: Unknown value for architecture setting: "foo"

@mgsloan mgsloan closed this as completed Mar 19, 2017
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

2 participants