`flow test --output=json` does not strictly emit JSON data
@chasefleming đang làm issue này rồi.
Từ ngày 2/1/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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 testto 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)
- Ngôn ngữ chính
- Go
- Star
- 209
- Fork
- 88
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của onflow/flow-cli
-
Simplify MCP contract sorting with slices helpersCó thể đã có người làm @luangucun đã nhận 46 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
`flow cadence lint` lints importsCó thể đã có người làm @holyfuchs đã nhận 185 ngày trước. Đang mởBug Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
flow test prints unreadable outputCó thể đã có người làm @holyfuchs đã nhận 183 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Tất cả issue của onflow/flow-cli
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
jordansmall/spindrift#5575 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JakeChampion/lang#12684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
goose sub-agent runs are never indexed: blame finds no session for any file a `delegate` child wroteĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
C-bug O-community X-blathers-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cockroachdb/cockroach#176150 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 12 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
wakatime/wakatime-cli#1649 ·
Maintainer thường phản hồi trong vòng 1 ngày