Skip to content

fatal: destination path '.' already exists and is not an empty directory. #4

@jmatsushita

Description

@jmatsushita

Hi there,

This is the same issue as purescript/spago#957 but I wanted to argue that the legacy package should be fixed. Even though it's a constructive forcing function to upgrade to the new spago, it introduces quite a bit of friction while trying to work with legacy packages. Arguably it's a bug in spago-legacy that would benefit from being patched.

Here's more info about the problem with a minimal reproducer with only the prelude package in spago.dhall, using spago 0.21.0 with a nix flake on macos, git version 2.47.0.

To rule out a problem with the global cache I use --global-cache skip.

 > GIT_TRACE=1 spago install --global-cache skip -V
2024-12-07 11:33:11.148668: [debug] Transformed config is the same as the read one, not overwriting it
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.241005: [debug] Ensuring that the package set is frozen
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.255324: [debug] Running `spago install`
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.255395: [debug] Getting transitive deps
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.256302: [debug] Running `fetchPackages`
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.256326: [debug] Checking if `purs` is up to date
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.291854: [info] Installing 1 dependencies.
@(src/Spago/Prelude.hs:311:19)
2024-12-07 11:33:11.291928: [debug] Running `getMetadata`
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.291944: [debug] Global cache directory: ".spago"
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.292513: [debug] Fetching package prelude
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.294060: [debug] Directory ".spago/__download-prelude-v6.0.1-c52e0d801056104a/download" does not exist, creating...
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.294214: [debug] Running `globallyCache`: PackageName {packageName = "prelude"} https://github.com/purescript/purescript-prelude.git v6.0.1
@(src/Spago/Prelude.hs:310:20)
2024-12-07 11:33:11.294358: [info] Installing "prelude"
@(src/Spago/Prelude.hs:311:19)
2024-12-07 11:33:12.181300: [error]
Failed to install dependency "prelude"
Git output:

11:33:12.179275 git.c:479               trace: built-in: git clone https://github.com/purescript/purescript-prelude.git .
fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
@(src/Spago/Prelude.hs:313:20)
2024-12-07 11:33:12.358026: [error]
Failed to install dependency "prelude"
Git output:

11:33:12.354393 git.c:479               trace: built-in: git clone https://github.com/purescript/purescript-prelude.git .
fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
@(src/Spago/Prelude.hs:313:20)
2024-12-07 11:33:12.369939: [error] Installation failed
@(src/Spago/Prelude.hs:313:20)
2024-12-07 11:33:12.370011: [error] Error:
@(src/Spago/Prelude.hs:313:20)
2024-12-07 11:33:12.370042: [error] ExitFailure 1
@(src/Spago/Prelude.hs:313:20)

Thanks for the great new tooling, hope there's some spare cycles to deal with migration friction 🙏

Cheers,

Jun

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