Skip to content

Rebuilding packages from the global database with modified dependencies #4510

@snoyberg

Description

@snoyberg

This applies to Stack master, specifically commit 9900d99. Repro (on a non-Windows system). With the following stack.yaml:

resolver: ghc-8.6.3
packages: []
extra-deps:
- time-1.8.0.1

This replaces the global time package with a different version. Running stack build unix causes both time and unix to be compiled, which makes sense, since unix depends on time.

Running stack build unix a second time should be a no-op, but instead, it rebuilds:

$ stack build unix
unix-2.7.2.2: configure
^C

This appears to be because the SourceMap knows nothing about unix (since it's a global package and not present at all in snapshot), and therefore Stack is ignoring the already-present copy in the snapshot database.

Possible solution: update the SourceMap to contain information about global packages.

CC @qrilka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions