Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

`flow test --output=json` does not strictly emit JSON data

未关闭
#1,324 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@chasefleming 已经在做这个了。

开始于 2024年1月2日。

评估

这个 Issue 还没有评估数据。

描述

Feedback
Instructions

Please fill out the template below to the best of your ability and include a label indicating which tool/service you were working with when you encountered the problem.

Problem

Logs outputted by flow test --output=json are not captured in any way and are emitted to stdio as plaintext. This is problematic because applications which rely on this functionality will fail to parse the output from the Flow CLI.

Steps to Reproduce

Run the command with a test file that emits a log.

Acceptance Criteria

The CLI strictly emits JSON output to stdio. There are multiple solutions for this:

  • Suppress logs entirely (probably the easy quick-fix that can be revisited later)
  • Extend the output of flow test to include logs. It's likely this could introduce some breaking changes to the schema of the CLI output and break external consumers, however, this is a relatively new feature so this is probably acceptable in order to migrate to a more robust output format in the long-run.
  • Output logs directly to stdio in JSON format and stream multiple messages in realtime (this is similar to flow emulator --log-format json, however requires all consumers be equipped to handle multiple JSON objects in the output). It does, however, offer the benefit of instantly serving in-progress information without waiting for a terminal state.
Context

Currently cadence log() calls break the VSCode Test Runner.

This relies on changes to the Cadence Test Framework (see https://github.com/onflow/cadence-tools/issues/265 https://github.com/onflow/cadence-tools/pull/267)

主要语言
Go
星标
209
派生
88
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

onflow/flow-cli 的其他 Issue

查看 onflow/flow-cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。