Skip to content

InvalidRelFile when using stack solver #1954

Closed
@maxigit

Description

@maxigit

Following this question I concluded it is a bug. I'll just copy paste my question and own answer from SO.

tl;dr

Using ../my_package using stack solver throw a InvalidRelFile exception where as stack build works fine. I'm happy to provide links to the broken package to help reproducing the bug if needed.

Original question

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.

Answer

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 ;-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions