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

stack build should reject incorrect version numbers #606

Closed
gregwebs opened this issue Jul 16, 2015 · 9 comments
Closed

stack build should reject incorrect version numbers #606

gregwebs opened this issue Jul 16, 2015 · 9 comments

Comments

@gregwebs
Copy link
Contributor

stack build foo-3
foo-0.0.1-2fc5f00bbc8c21a5b4453ada417d72b3: unregistering (flags changed from ["-f-fdev"] to [])
foo-0.0.1: configure
foo-0.0.1: build
foo-0.0.1: install
@DanBurton
Copy link
Contributor

+1 agree.

Expected: error message
Actual: no error

@chrisdone
Copy link
Member

Actually the wider issue is that stack build just ignores non-existent targets. You can pass cowabunga and it would ignore it.

@snoyberg
Copy link
Contributor

Good point, everything that doesn't parse as a package name or identifier is treated as a directory name. Presumably we should just verify that all of those directories exist, right?

@chrisdone
Copy link
Member

Sounds good to me. 👍

@snoyberg
Copy link
Contributor

Wait a second... I can't reproduce this. @gregwebs what version of stack are you using? @chrisdone did you actually test cowabunga?

@snoyberg
Copy link
Contributor

vagrant@vagrant-ubuntu-trusty-64:~/haskell/stack$ $(stack exec which stack) build cowabunga-
The following targets could not be parsed as package names or directories:
cowabunga-

vagrant@vagrant-ubuntu-trusty-64:~/haskell/stack$ $(stack exec which stack) build foo-3
Didn't see foo-3 in your package indices. Updating and trying again.
Fetched package index.
Populated index cache.
The following package identifiers were not found in your indices: foo-3
vagrant@vagrant-ubuntu-trusty-64:~/haskell/stack$ stack build foo-3
Didn't see foo-3 in your package indices. Updating and trying again.
Fetched package index.
Populated index cache.
The following package identifiers were not found in your indices: foo-3
vagrant@vagrant-ubuntu-trusty-64:~/haskell/stack$ stack build cowabunga
The following target packages were not found: cowabunga

vagrant@vagrant-ubuntu-trusty-64:~/haskell/stack$ stack build fake/dir
The following targets could not be parsed as package names or directories:
fake/dir

@chrisdone
Copy link
Member

Ah, that's new behaviour. In the past it would ignore nonexistent names.

@gregwebs
Copy link
Contributor Author

I am doing this where there is a local package foo listed in my stack.yaml but it is not at version 3.

stack --version
Version 0.1.2.1, Git revision 74c20f3 (dirty)

@snoyberg
Copy link
Contributor

Ahh, I see, OK. That clarifies, and is much more specific than I thought.

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

4 participants