Skip to content

ghcide-tests' addDependentFile test #4194

Closed
@soulomoon

Description

@soulomoon

What is happenning

  • GetModificationTime dep-file.txt cache value in shake extra is cleanup
  • GetModificationTime dep-file.txt is dirty
  • shake restart
  • GetModificationTime dep-file.txt computed
  • GetModificationTime dep-file.txt cache value is added
  • but the new value is not flush the result to hls-graph (Hence its version step is not updated)
  • shake restart
  • computing GetModificationTime dep-file.txt
  • GetModificationTime dep-file.txt cache value is read (The source of the error) and returned
  • it's reverse dep compute, since its step is not updated in the last run, the value is considered as the old result, so it's reverse dep is not recomputed.

============================
After file change and index
The correct case

<-- {
    "jsonrpc": "2.0",
    "method": "$/progress",
    "params": {
        "token": "22",
        "value": {
            "kind": "end",
            "message": "Finished indexing 1 files"
        }
    }
}
<-- {
    "jsonrpc": "2.0",
    "method": "textDocument/publishDiagnostics",
    "params": {
        "diagnostics": [],
        "uri": "file:///private/var/folders/36/_743psv11gv2wrj9dclrpd500000gn/T/hls-test-root/extra-dir-52959961234/Foo.hs",
        "version": 0
    }

but we sometimes we have, never get the diganostic for file that have changed

<-- {
    "jsonrpc": "2.0",
    "method": "$/progress",
    "params": {
        "token": "23",
        "value": {
            "kind": "end",
            "message": "Finished indexing 1 files"
        }
    }
}

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