Skip to content

Targets outside of root dir don't build #366

@chrisdone

Description

@chrisdone

Noticed the other day in passing, reporting before I forget:

Expected

stack build to build all targets, including those outside of the directory hierarchy where stack.yaml resides.

Actual

Only builds them when they are dependencies or specifically asked for. I think this is a bug from my original code in fpbuild.

chris@retina:~$ mkdir new-template
chris@retina:~$ cd new-template/
chris@retina:~/new-template$ stack new
[snip]
Wrote project config to: /home/chris/new-template/stack.yaml
chris@retina:~/new-template$ mkdir ../other-dir
chris@retina:~/new-template$ cd ../other-dir/
chris@retina:~/other-dir$ mv ../new-template/stack.yaml .
chris@retina:~/other-dir$ cat stack.yaml
flags: {}
packages:
- ../new-template
extra-deps: []
resolver: lts-2.14
chris@retina:~/other-dir$ stack build
chris@retina:~/other-dir$ stack build ../new-template/
new-template-0.1.0.0: configure
Configuring new-template-0.1.0.0...
[snip]
chris@retina:~/other-dir$ 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions