Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat #51: Machine readable #52

Merged
merged 15 commits into from
Nov 10, 2023
Merged

feat #51: Machine readable #52

merged 15 commits into from
Nov 10, 2023

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Nov 8, 2023

Motivation

The output of ic-wasm info is useful but not reliably machine readable. See #51 for more details.

Changes

  • Add a --json flag to ic-wasm info.
  • Define a structure for the Wasm info and define Display and JSON Serialize traits on that structure.
    • The Display output matches the existing output exactly.
    • The JSON output provides the same data but in machine readable format.

Tests

  • The existing test for human readable output passes with no changes.
  • A similar test has been added for JSON output.

@bitdivine bitdivine changed the title Machine readable feat #51: Machine readable Nov 8, 2023
@bitdivine bitdivine marked this pull request as ready for review November 8, 2023 01:15
@bitdivine bitdivine requested a review from a team as a code owner November 8, 2023 01:15
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity left a comment

Choose a reason for hiding this comment

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

Mostly LG.

Cargo.toml Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@chenyan-dfinity chenyan-dfinity left a comment

Choose a reason for hiding this comment

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

LGTM

@bitdivine bitdivine merged commit 9cfc86c into main Nov 10, 2023
3 checks passed
@bitdivine bitdivine deleted the machine-readable branch November 10, 2023 20:16
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.

2 participants