Support optional JSON output for config, list, lookup/info, outdated & search; improve tabular output#1230
Conversation
b8c8eb5 to
210425a
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces native JSON output support for the list, outdated, search, lookup, and config commands. This is achieved through the integration of a new swift-json library and a Zsh wrapper script that uses jq and column for terminal formatting. The implementation includes a significant refactor of the CatalogApp and InstalledApp models to handle metadata key mapping and JSON serialization. Feedback highlights several performance and architectural concerns, including inefficient JSON re-parsing in the outdated command, high memory overhead from storing raw JSON strings in models, and potential performance degradation due to disk I/O during canonical path resolution. Additionally, the review points out the tight coupling created by using a magic file descriptor (FD 3) for communication between the binary and the wrapper script, and the bypass of terminal detection logic via hardcoded ANSI escape sequences.
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…tiveTo:)`. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…rate expressions. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Minor cleanup. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…outdated` & `search`. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
210425a to
f1f85a7
Compare
|
|
/gemini review Besides reviewing all the new code changes, also reply to each open review comment with whether the issue has been resolved. |
Code ReviewSummaryThis pull request introduces optional JSON output for several General Feedback
Specific Issues
|
@gemini-code-assist Does that alleviate your concerns? If not, explain what is problematic. Is there some better way to determine if FD3 is piped? Or do you have a problem with even checking if FD3 is piped? |
|
Thank you for the clarification. I understand that the Given this context, the approach is functional and serves the project's specific testing requirements. I have no further concerns regarding this implementation. Thank you for explaining the rationale behind it. |

Support optional JSON output for
config,list,lookup/info,outdated&search; improve tabular output.Resolve #190
Resolve #412
Resolve #1091