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 #206

Open
carymrobbins opened this issue Nov 20, 2015 · 4 comments
Open

Stack build #206

carymrobbins opened this issue Nov 20, 2015 · 4 comments

Comments

@carymrobbins
Copy link
Owner

Currently, the stack builder can be a little inefficient. In order to get absolute paths to the source locations of errors, we must run stack build . in each package directory, which is slower than just running stack build at the project root.

Note that there is an open issue upstream to get absolute paths when using stack build - commercialhaskell/stack#1348

@carymrobbins
Copy link
Owner Author

The issue upstream has been resolved, so a more efficient builder can now be implemented.

@tobiasgwaaler
Copy link
Contributor

It seems to me that "Make project" and "Make module ..." works the same way: targets are computed, and the dependencies between them, then each each module/target will be built. The way I see it we have two options to avoid calling stack build . in each module/target/package:

  1. Create a separate StackBuilder, say StackBuilderAll, that gets called when "Make project" is issued. I'm not sure if this is even possible?
  2. Ignore the targets, and always do a stack build in the root directory, so all modules/targets/packages gets built, even if you've only asked that one module gets built by issuing a "Make module ..."

Is there something I'm missing? :)

@tobiasgwaaler
Copy link
Contributor

And either way, since this landed in stack 1.0.4.2, we should keep the old way of doing it when using an older version of stack
never mind, it actually landed in v0.1.10.0, and in my opinion that's too old to support

@carymrobbins
Copy link
Owner Author

Yeah, I think just doing stack build for any request to build is probably "good enough" for now. We'd just want to confirm that it properly outputs absolute paths to the source locations.

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