-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
fs: port SonicBoom module to fs module as FastUtf8Stream #58897
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
Conversation
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #58897 +/- ##
==========================================
- Coverage 90.06% 89.96% -0.11%
==========================================
Files 648 649 +1
Lines 191078 192007 +929
Branches 37454 37631 +177
==========================================
+ Hits 172101 172742 +641
- Misses 11598 11885 +287
- Partials 7379 7380 +1
🚀 New features to boost your workflow:
|
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huge +1. This would be beneficial for other loggers too.
41f2c92 to
5631e21
Compare
|
Tests updated. @mcollina ... So far I have not ported any of the tests that require |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the worst bugs we fixed are being tests by the proxyquire-based tests (those are error conditions that are impossible to replicate without mocking). They are the battle scars, and they are important to keep around / being ported.
I'm ok for landing this as-is, but can you create a tracking issue for all the tests that you skipped so that they can be ported around?
|
Absolutely. It's really all of the tests that use proxyquire. We can port those by monkey patching the fs APIs. Not as clean but doable. Will just take time |
bb11c97 to
e03efc9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
e03efc9 to
da471d7
Compare
da471d7 to
f5136bd
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f5136bd to
583dcfb
Compare
|
@mertcanaltin ... looks like the tests here are hanging and failing consistently. Looks like switching away from using |
I would love to help you with this, I'll try an arrangement |
|
Tests are failing on Windows with this change on |
|
parallel/test-fastutf8stream-flush-mocks and parallel/test-fastutf8stream-sync have recently failed 14 PRs out of the recent 100 CI runs: #59638 |
As a first step to porting portions of the pino structured logger into the runtime, this commit ports the SonicBoom module to the fs module as FastUtf8Stream. Sonicboom is a dependency of pino.
This is a faithful port of the SonicBoom module with some modern updates, such as converting to a Class and using Symbol.dispose. The bulk of the implementation is unchanged from the original.
Refs: #49296 (comment)
/cc @mcollina @ronag @kibertoad @jsumners @mmarchini @feugy