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(gas-report): add more logs to stdin piping #1694

Merged
merged 3 commits into from
Oct 3, 2023
Merged

Conversation

alvrs
Copy link
Member

@alvrs alvrs commented Oct 3, 2023

  • minor addition to pass through logs received via stdin (since the test command can be long running it's useful to know if the tests are still running or the gas reporter is already parsing)

@alvrs alvrs requested a review from holic as a code owner October 3, 2023 16:58
@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2023

🦋 Changeset detected

Latest commit: f4753c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 30 packages
Name Type
@latticexyz/gas-report Patch
@latticexyz/cli Patch
@latticexyz/schema-type Patch
@latticexyz/store Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/ecs-browser Patch
@latticexyz/faucet Patch
@latticexyz/network Patch
@latticexyz/noise Patch
@latticexyz/phaserx Patch
@latticexyz/protocol-parser Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/services Patch
@latticexyz/solecs Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/std-client Patch
@latticexyz/std-contracts Patch
@latticexyz/store-cache Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mud-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 5:39pm

holic
holic previously approved these changes Oct 3, 2023
data += chunk;
});

process.stdin.on("end", () => {
console.log("Done waiting for stdin");
Copy link
Member

Choose a reason for hiding this comment

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

process.stdin is a stream so you could also

process.stdin.pipe(process.stdout)

Copy link
Member

@holic holic Oct 3, 2023

Choose a reason for hiding this comment

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

and could prob lean on a generic stream package like https://github.com/stream-utils/stream-to-array

const stdin = (await streamToArray(process.stdin)).map((chunk) => Buffer.from(chunk).toString('utf8'))

@alvrs alvrs merged commit ba17bda into main Oct 3, 2023
@alvrs alvrs deleted the alvrs/gas-report-2 branch October 3, 2023 17:50
@github-actions github-actions bot mentioned this pull request Oct 3, 2023
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