FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Compiling from different directories invalidates the compilation cache · Issue #4586 · purescript/purescript · GitHub

Compiling from different directories invalidates the compilation cache #4586

Description

Description

When running compilation from a nested directory (e.g., /lib/my-lib) with output set to the root using --output ../../output, the cache-db saves file paths relative to the current working directory.

This causes the cache to be invalidated when compilation is subsequently run from the root directory or from a differently nested directory, resulting in a full rebuild.

To Reproduce

  1. Navigate to a subdirectory within your project
  2. Compile with the output directory set at a higher level than the current working directory
  3. Observe that file paths in cache-db.json are relative to the current working directory (e.g., ../../.spago/some-root-dep)
  4. Run compilation from a different directory and observe that the cache is invalidated

Expected behavior

File paths could be stored relative to the location of cache-db.json - the output folder - rather than relative to the working directory from which compilation was run. This would ensure cache consistency regardless of where compilation is invoked.

PureScript version

0.15.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL