Skip to content

InvalidAbsDir "./stack-setupXXXXX" from Path.IO.listDirectory #1017

@robstewart57

Description

@robstewart57

When I execute stack setup I'm getting this error:

$ stack setup
InvalidAbsDir "./stack-setup31658"

This is thrown by Path.parseAbsDir in the path package (see line 79). I've modified Path.IO.listDirectory to print the filepath it is calling parseAbsDir on, so that the file path is printed each time and also so that I can get the stack trace up to that point.

This is the printed file paths and the stack trace:

"/home/rob/.stack/programs/i386-linux/ghc-7.10.2.tar.xz"
"/home/rob/.stack/programs/i386-linux/.."
*** Exception (reporting due to +RTS -xc): (THUNK_1_0), stack trace:
  Path.CAF
  --> evaluated by: Path.IO.listDirectory.\,
  called from Path.IO.listDirectory,
  called from Stack.Setup.listInstalled,
  called from Stack.Setup.ensureGHC,
  called from Stack.Types.StackT.>>=,
  called from Main.setupCmd.\,
  called from Main.withUserFileLock.\,
  called from Main.withUserFileLock,
  called from Main.setupCmd,
  called from Main.main.\,
  called from Data.Attoparsec.Args.withInterpreterArgs,
  called from Main.main

I've raised this question with @chrisdone who believes that stack should canonicalize paths before calling parseAbsDir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions