Skip to content

feat(cli): support external workspace paths - #288

Open
Yell-walkalone wants to merge 2 commits into
mainfrom
yell/fix_workspace_path
Open

Yell-walkalone wants to merge 2 commits into
mainfrom
yell/fix_workspace_path

Conversation

@Yell-walkalone

Copy link
Copy Markdown
Contributor

What Changed

  • Add optional --path handling for ecc run so a workspace can live outside the project directory; without it, the existing project-local workspace layout remains unchanged.
  • Add ecc workspace import WORKSPACE --project PROJECT --path PATH to register an existing external workspace without opening or changing it.
  • Persist canonical external workspace paths in the project manifest, validate conflicts and existing registrations, and document the CLI behavior in English and Chinese user guides.

Scope

  • CLI - command behavior, Typer command surface, output formats, or workspace commands.
  • Flow/runtime - workspace lifecycle, EngineFlow, step execution, logs, metrics, or artifacts.
  • EDA integration - Yosys, ECC-Tools, DreamPlace, KLayout, PDKs, or native/runtime wrappers.
  • Build/package - Nix, PyInstaller, wheels, uv.lock, or release artifacts.
  • CI/release - GitHub Actions, version checks, changelog, or release automation.
  • Tests/docs only

Runtime And Packaging Impact

  • CLI output or machine-readable contract changed
  • Workspace layout, flow state, or artifact paths changed
  • No native toolchain or dependency changes
  • PyInstaller, Nix, or release artifact changed

Notes:

  • The default workspace path behavior is unchanged when --path is omitted.
  • No generated build output or package artifact is committed.

Validation

  • uv run --no-sync ruff format --check chipcompiler test
  • uv run --no-sync ruff check --output-format=github chipcompiler test
  • Targeted workspace-path/manifest tests: 54 passed
  • PyInstaller build and smoke: ECOS_PYINSTALLER_MODE=onedir uv run --no-sync --managed-python pyinstaller ecc.spec --clean --noconfirm; ecc --version, ecc run --help, and ecc workspace import --help passed.
  • Manual GCD CLI check with /nfs/home/huangzengrong/projects/benchmark/gcd: external ecc run --path --resume returned no_op=True, and ecc workspace import --path registered successfully; manifest paths matched the requested directories. No flow steps were run.
  • nix run .#cli -- --help (not run; unrelated to this CLI change)

Skipped checks and reason:

  • Full pytest command was run. 2,765 tests passed, 6 skipped, and 4 xfailed; 34 existing filesystem-sensitive tests failed only when their temporary directories were on the repository NFS mount (renameat2(RENAME_EXCHANGE) returned EINVAL, and one cleanup assertion observed an NFS .nfs* file). The same affected tests pass with --basetemp=/tmp except the existing test that requires a complete PDK unavailable in this local fixture environment.
  • The built build/ and dist/ directories were removed before publishing.

Checklist

  • I kept the change scoped to ECC.
  • I updated docs or user-facing CLI text where behavior changed.
  • I included lockfile or version metadata updates when dependencies changed.
  • I documented skipped validation and remaining risk.
  • I did not include local caches, virtual environments, or generated build outputs.
  • No Co-authored-by trailer was added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant