Skip to content

feat(cli): syspi list prints the locked packages and whether each installed copy is present - #13

Open
devin-ai-integration[bot] wants to merge 5 commits into
developfrom
feat/list
Open

devin-ai-integration[bot] wants to merge 5 commits into
developfrom
feat/list

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

syspi list [-C dir] [-offline] [-json] — the second of the commands 0.1.0 lacks. Independent of #10 (remove); both add the identical new file internal/install/libpath.go (libPath, installedMatches moved out of the resolver), so they merge in either order without a conflict.

  • install.List(root) reads only .project.lock.json and lib/ — no repository or server is contacted, so -offline changes nothing and is accepted for uniformity. Without a lock it fails (no .project.lock.json; run syspi lock or syspi install first); it writes nothing.
  • One Listing per lock entry in resource order (the lock's own order): resource, kind, publisher, name, version, vcs, tag, revision, source (archive URL/path or local directory), path (lib/<publisher>-<name>_<version>[.kpar], project-relative) and installed (present under lib/). Standard libraries and local directories have no path/installed: recorded, never installed.
  • Text output is a text/tabwriter table — RESOURCE VERSION KIND REVISION PATH STATE, KIND being the VCS of an exported tree, STATE one of present, missing, not installed:
RESOURCE                                                                                                                  VERSION  KIND      REVISION                                  PATH                                              STATE
https://www.omg.org/spec/SysML/20250201/Systems-Library.kpar                                                              -        standard  -                                         -                                                 not installed
pkg:generic/OpenSysML-Extensions-Library?vcs_url=git%2Bhttps:%2F%2Fgithub.com%2FOpen-MBEE%2FOpenSysML-Extensions-Library  1.0.0    git       b36b361f85af4764de8e2817cbae62fb9e74ffdb  lib/Open-MBEE-OpenSysML_Extensions_Library_1.0.0  present

Presence is existence only; content against the lock is verify's job (next PR).

Tests: internal/install/list_test.go (vcs, archive, local and standard entries; resource order; a removed copy is missing, not an error) and tests/e2e/list_test.go (text and -json output, determinism, nothing written, the git/hg/svn fixtures). Docs: README "Commands", docs/packages.md "Install layout", changes/unreleased/list.added.md.

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/888897f71c264c89a8abc11e9a432241
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/888897f71c264c89a8abc11e9a432241?variant=devin
Requested by: @HuiJun


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

…talled copy is present

One line per lock entry in resource order: version, kind (the VCS of an exported tree), revision, path under lib/ and present/missing; standard libraries and local directories are listed as never installed. -json prints the same as an array. list reads only the lock and lib/.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 12, 2026 06:34
…ad of calling it missing

Co-Authored-By: jason.han <hanhuijun@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Inaccessible packages falsely reported missing — List now returns the Lstat error unless it is not-exist, so an unreadable lib/ fails instead of listing copies as missing; tested with lib/ chmod 000.

View findings in Devin Review · Follow Devin's work

Devin Review

…n stage

Co-Authored-By: jason.han <hanhuijun@gmail.com>
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