-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: forc call json output #7156
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r; added regex to match and/or ignore logs from other libraries
…re receipts and script output if none
CodSpeed Performance ReportMerging #7156 will not alter performanceComparing Summary
|
JoshuaBatty
approved these changes
May 8, 2025
kayagokalp
approved these changes
May 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dev-experience
Anything to do with the developer experience
enhancement
New feature or request
forc
forc-call
Everything related to the `forc-call` plugin in `forc-client` package
logging
Related to logging (tracing, stdout, stderr, log-files)
team:tooling
Tooling Team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds JSON output support for
forc-call
CLI.Additionally, it adds JSON support for
tracing-subscriber
inforc-tracing
- with option to omit logs from other libraries (via regex).Json
variant) to output JSON responseChangelog
This pull request introduces enhancements to the
forc-call
plugin, focusing on improving output formatting, streamlining verbosity handling, and updating test cases to reflect these changes.The most significant updates include the addition of a JSON output format, the removal of the
Verbosity
struct, and modifications to test cases to handle optional results.Output Formatting Enhancements:
Json
variant to theOutputFormat
enum for outputting full tracing information in JSON format. Implemented theWrite
trait forOutputFormat
to handle different output styles. (forc-plugins/forc-client/src/cmd/call.rs
, forc-plugins/forc-client/src/cmd/call.rsR60-R87)Command
struct to include a short option (-o
) for specifying the output format. (forc-plugins/forc-client/src/cmd/call.rs
, forc-plugins/forc-client/src/cmd/call.rsL319-R319)Verbosity Handling Simplification:
Verbosity
struct and its associated methods. Verbosity is now directly represented as an integer (cmd.verbosity
) for simplicity. (forc-plugins/forc-client/src/cmd/call.rs
, [1];forc-plugins/forc-client/src/op/call/call_function.rs
, [2] [3] [4] [5]Test Case Updates:
.unwrap()
on theresult
field where applicable. This ensures compatibility with changes to how results are processed. (forc-plugins/forc-client/src/op/call/call_function.rs
, [1] through [2]These changes improve the usability and maintainability of the
forc-call
plugin, making it more robust and user-friendly.Note: This is a pre-requisite to resolve #7019; the output script in the JSON can be directly parsed into a
tx.json
file forforc-debug
.Checklist
Breaking*
orNew Feature
labels where relevant.