- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.6k
errors,stream-transform: migrate to use internal/errors.js #13310
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
        
          
                lib/_stream_transform.js
              
                Outdated
          
        
      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.
'Calling transform done when still transforming' [](start = 27, length = 48)
don't need this anymore?
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.
@kunalspathak Thanks. It's done.
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.
[](start = 22, length = 1)
nit: can you move the space on above line?
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.
@kunalspathak Done.
        
          
                lib/internal/errors.js
              
                Outdated
          
        
      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.
If I recall correctly, there are a couple of places in core with a similar error. A more generic error message may be appropriate.
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.
@jasnell Modified the error message to be more generic. Thanks
8ff453c    to
    404387b      
    Compare
  
    | @sreepurnajasti  - Changes incorporated from my feedback looks good although I kind of don't like  | 
        
          
                lib/_stream_transform.js
              
                Outdated
          
        
      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.
I'd agree a better name for the error would be good. Maybe 'ERR_TRANSFORM_WITH_LENGTH_0'.
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.
@mhdawson Done
        
          
                lib/_stream_transform.js
              
                Outdated
          
        
      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.
Maybe to be consistent with my other suggestion:
'ERR_TRANSFORM_MULTIPLE_CALLBACK'.
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.
@mhdawson Fixed.
        
          
                lib/_stream_transform.js
              
                Outdated
          
        
      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.
Maybe to be consistent with my other suggestion:
'ERR_TRANSFORM_ALREADY_TRANSFORMING' String is already specific to transform so making that part of the ID makes sense to me.
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.
@mhdawson Done
404387b    to
    47ada2c      
    Compare
  
    47ada2c    to
    0cc5f2d      
    Compare
  
    0cc5f2d    to
    9ba9855      
    Compare
  
    | CI good landing | 
| Landed as d50a802 | 
PR-URL: #13310 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
| @mhdawson Thank you :) | 
| I'm strongly -1 on this one. This forces some good rework on  cc @nodejs/streams | 
| To be clear, this is something we should be doing asap, but we need to think a bit how we want to do it. | 
| :-/ ... reverting would be unfortunate. Perhaps instead, since this is semver-major and won't go out in a release any time soon, can we take a short bit of time to figure out the strategy for readable-stream? And if we can't identify a reasonable path forward, then revert... | 
| That's ok for me, there is no hurry to revert. | 
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
lib/_stream_transform.js
ref: #11273