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

Can't use component syntax with hackage package TARGETs #2382

Closed
dschalk opened this issue Jul 17, 2016 · 6 comments
Closed

Can't use component syntax with hackage package TARGETs #2382

dschalk opened this issue Jul 17, 2016 · 6 comments

Comments

@dschalk
Copy link

dschalk commented Jul 17, 2016

stack build --file-watch --test --copy-bins --haddock wai-extra :warp warp:doctest --exec 'echo Yay, it worked!' returns "Could not find a component named warp". I am using 64 bit Ubuntu 14.04. Prior to running the code, I entered "stack install wai warp". I can import Network.Wai in stack ghci.

@sjakobi
Copy link
Member

sjakobi commented Jul 17, 2016

This sounds like warp is not one of your local packages. As documented here you can only address the components of your local packages, not dependencies.

@sjakobi
Copy link
Member

sjakobi commented Jul 17, 2016

@dschalk: I have opened #2384 for improvement of the error message.

A PR would be most welcome!

@mgsloan mgsloan changed the title stack build --file-watch --test --copy-bins --haddock wai-extra :warp warp:doctest --exec 'echo Yay, it worked!' returns "Could not find a component named warp". I am using 64 bit Ubuntu 14.04. Prior to running the code, I entered "stack install wai warp". I can import Network.Wai in stack ghci. Can't use component syntax with hackage package TARGETs Jul 19, 2016
@mgsloan
Copy link
Contributor

mgsloan commented Jul 19, 2016

I've moved the title to body and made the title a summary of the issue. Which is that you can't currently ask stack to build + run the test of a dependency, it must be a local package. I don't see any reason we shouldn't lift this restriction.

@sjakobi
Copy link
Member

sjakobi commented Jul 19, 2016

Which is that you can't currently ask stack to build + run the test of a dependency, it must be a local package.

Actually it's not even clear from the original issue description whether wai-extra and warp were dependencies of the project.

@dschalk: Can you give us the output of stack list-dependencies for your project?

I don't see any reason we shouldn't lift this restriction.

I'm a bit worried that the distinction between local (project) packages and others might become even more fuzzy.

Would stack ide targets then list targets for both project packages and dependencies? Should we add a flag --include-dependencies?

Apart from these concerns, I do agree though, that having an easy way to run the test suites or benchmarks for a dependency would be a nice thing to have.

@mgsloan
Copy link
Contributor

mgsloan commented Jul 19, 2016

I'm a bit worried that the distinction between local (project) packages and others might become even more fuzzy.

True! It would have some funny interactions with --test and targets like :comp-name

@snoyberg
Copy link
Contributor

Closing, it seems like the original problem is still unclear

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

4 participants