mb14
mb14

Reputation: 22636

Stack InvalidRelFile error when adding local package

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
InvalidRelFile "/home/max/devel/sql-fragment/sql-fragment.cabal"

My stack file looks like

flags: {}
packages:
- '.'
- ../sql-fragment
extra-deps:
   ...

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.

Upvotes: 2

Views: 275

Answers (2)

mgsloan
mgsloan

Reputation: 3295

Fixed with this commit. https://github.com/commercialhaskell/stack/commit/42a61fb278aeb99ad61bb088da9a87b2313ac325

The issue tracker is a better place for this.

Upvotes: 1

mb14
mb14

Reputation: 22636

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 and stack build works perfectly ;-).

Upvotes: 2

Related Questions