Skip to content

piano report only finds project-local data when run from project root #85

@rocketman-code

Description

@rocketman-code

Context

PR #77 added project-local run data at target/piano/runs/. The default_runs_dir() function probes for this directory using a relative path: PathBuf::from("target/piano/runs").

Problem

This means piano report only finds project-local data when invoked from the project root directory. Running cd src && piano report or invoking from a subdirectory falls through to the global ~/.piano/runs/ fallback.

This is consistent with how Cargo works (you typically run cargo from the project root), but could be surprising to users.

Options

  1. Walk up parent directories looking for target/piano/runs/, similar to how Cargo finds Cargo.toml
  2. Document the assumption that piano commands should be run from the project root
  3. Accept as-is (consistent with Cargo behavior)

Discovered during code review of PR #77.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityuxUser experience improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions