Skip to content

pds check: workspace diagnostics have no source location (file:line:col) — only the workspace name #68

Description

@JonathanTurnock

Summary

When pds check is run on a file inside a workspace (a dir with pds.toml), diagnostics are emitted with no source location — just the workspace name as the prefix. Checking the same file standalone (no surrounding pds.toml) emits proper file:line:col. So the location info clearly exists; it's dropped on the workspace path.

In a multi-module model this makes errors very hard to locate — I had to bisect a 113-line module by hand (trimming line ranges and re-checking) to find a single bad statement, because every error just said mymodule: with no line.

Repro

/tmp/pdsrepro/pds.toml      ([doc]\nname = "repro")
/tmp/pdsrepro/bad.pds       (below)
/tmp/standalone.pds         (identical content, no pds.toml around it)

bad.pds / standalone.pds:

public container X for repro::Y {
  public Z(): bool {
    return Ok({ a: false })
  }
}

Workspace filepds check pdsrepro/bad.pds:

pdsrepro: error: expected an expression
pdsrepro: error: expected an expression
pdsrepro: error: expected a statement
pdsrepro: error: expected a callable or declaration
pdsrepro: error: unexpected token at top level
pdsrepro: error: return type `Result` does not match declared `bool`

Standalone filepds check standalone.pds:

standalone.pds:3:15: error: expected an expression
standalone.pds:3:15: error: expected an expression
standalone.pds:3:15: error: expected a statement
standalone.pds:3:27: error: expected a callable or declaration
standalone.pds:5:1: error: unexpected token at top level
standalone.pds:3:12: error: return type `Result` does not match declared `bool`

pds check --all has the same problem (errors keyed by workspace, no file/line).

Expected

Workspace diagnostics should carry the same file:line:col the standalone path already produces (ideally the file path relative to the workspace root), so a specific bad statement is locatable without manual bisection.

Actual

Errors are prefixed only with the workspace name; no file, line, or column.

Environment

  • pds 0.1.7
  • Windows

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