Skip to content

Extensible snapshots: git repos not shared by snapshot #3551

@dbaynard

Description

@dbaynard

Following from @mgsloan in #3431 I can confirm that git repos are not being shared by projects on the same machine using the same snapshot. Opening a new issue as suggested, though this relates to #3535 and #3330 too.

To reproduce; using any snapshot containing git repos,

  1. Build any project using that snapshot. The git repos will be stored in the local .stack-work directory.
  2. Build any other project using that snapshot. The git repos will be re-downloaded, and stored in that local .stack-work directory.

Alternatively,

  1. Install a package using the global-project where the global stack.yaml refers to that snapshot. The git repos will be stored in the global-project's .stack-work directory.
  2. Build a project using the same snapshot. The git repos in that project's stack.yaml will be downloaded; then all the repos from the snapshot will be re-downloaded. All will be stored in the local .stack-work directory.

I would expect that snapshot git repos would be downloaded in the global snapshot directory, once per snapshot.

My workaround involves manually linking the .stack-work/download directory of the project to that of the global-project; this is potentially problematic, as that means all git repos are downloaded there (and so two projects using different commits from the same repo will be incompatible) though I haven't run in to this issue.

Furthermore, it may also be desirable to download the stack.yaml extra-deps repos to a global directory and then check them out using 'git worktree' if available.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions