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

local-bin-path is not relative to the stack.yaml that specifies it #1340

Closed
rrnewton opened this Issue Nov 12, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@rrnewton
Contributor

rrnewton commented Nov 12, 2015

We like to have projects that build all the stack-built binaries into ./bin within the project directory so that other scripts can easily find them. But we were surprised to find that relative paths are interpreted relative to wherever stack runs, not the stack.yaml file containing the path.

Steps to reproduce:

With stack 0.1.6.0., put following line in stack.yaml:

local-bin-path: ./bin/

Switch to a subdirectory and build:

$ mkdir ./bin/
$ mkdir ./foo/
$ cd foo
$ stack build 
No directory could be located matching the supplied path: ./bin/

Expected behavior:

That ./bin is relative to the stack.yaml file that contains it.

Actual:

That local-bin-path is relative to the directory in which stack build is executed, which can be a deep subdirectory because of the automatic "look upwards to find stack.yaml" behavior.

@drwebb

This comment has been minimized.

Contributor

drwebb commented Nov 12, 2015

This seems very reasonable to me, and a pretty minimal change.
On Nov 12, 2015 7:22 AM, "Ryan Newton" notifications@github.com wrote:

We like to have projects that build all the stack-built binaries into
./bin within the project directory so that other scripts can easily find
them. But we were surprised to find that relative patths
Steps to reproduce:

With stack 0.1.6.0., put following line in stack.yaml:

local-bin-path: ./bin/

Switch to a subdirectory and build:

$ mkdir ./bin/
$ cd foo
$ stack build
No directory could be located matching the supplied path: ./bin/

Expected behavior:

That ./bin is relative to the stack.yaml file that contains it.
Actual:

That local-bin-path is relative to the directory in which stack build is
executed, which can be a deep subdirectory because of the automatic "look
upwards to find stack.yaml" behavior.


Reply to this email directly or view it on GitHub
#1340.

@drwebb drwebb self-assigned this Nov 12, 2015

@mgsloan mgsloan added this to the P2: Should milestone Nov 12, 2015

@drwebb

This comment has been minimized.

Contributor

drwebb commented Nov 14, 2015

@rrnewton: local-bin-path relative tot the project dir should be the behavior now with f8d0129

drwebb pushed a commit that referenced this issue Nov 14, 2015

Tristan Webb

mgsloan added a commit that referenced this issue Nov 16, 2015

@borsboom borsboom closed this Nov 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment