Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
InvalidRelFile when using stack solver #1954
Following this question I concluded it is a bug. I'll just copy paste my question and own answer from SO.
I'm having this strange issue : I'm trying to add a local package to my stack file and I get the following error. when I try to build it (stack build) it kind of work but fails suggesting me to use stack solver but when I run stack solver I got the following error
Using configuration file: stack.yaml
My stack file looks like
I'm on Ubuntu 15.02 trying to use GHC-7.8.4 and stack 1.0.4 The two packages, sql-fragment and sql-fragment-mysql-simple can be found on github.
It's probably a bug in stack. I managed to find a workaround by moving sql-fragment directory into sql-fragment-mysql-simple, change ../sql-fragment to sql-fragment in the stack file launch the solver -stack solver --update-config and it works. What is strange is, I add to properly move the directory to make it work (just creating a symbolic link woudn't work) and once the solver has done its job. I moved sql-fragment where it was, revert the path to ../sql-fragment andstack build` works perfectly ;-)
I am not sure if there are any issues in allowing packages outside the current directory. Though nothing stops us from doing that and we can support that use case, it might be simpler to think of stack.yaml only covering packages under the dir tree. Anything outside the tree can be treated as external package with something like this:
@mgsloan any thoughts on supporting outside the tree packages as part of the project? Anyway, we will have to either fix this or provide an appropriate error message.
I think the technical issue here is that when we try to make a path relative to the current directory using
@mrkkrp we can debate if
My argument in favor of
It makes sense for
FYI, I'm trying out stack for the first time on Windows 10. I ran into this issue while following the instructions on New in-depth guide to stack. It said to run