Skip to content

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Apr 13, 2023

Mainly the changes contain converting decoder into a class and use private properties for brand validation. It comes with a caveat that I want to ask the community feedback and help.

With the following changes, the following test does not work, and is removed. Therefore, it makes this pull request a breaking change? Can we avoid that? I'm adding needs-cigtm just in case...

// Should work without 'new' keyword
const decoder2 = {};
StringDecoder.call(decoder2);
assert.strictEqual(decoder2.encoding, 'utf8');

@anonrig anonrig added semver-major PRs that contain breaking changes and should be released in the next major version. needs-citgm PRs that need a CITGM CI run. labels Apr 13, 2023
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. string_decoder Issues and PRs related to the string_decoder subsystem. labels Apr 13, 2023
@cjihrig
Copy link
Contributor

cjihrig commented Apr 13, 2023

Therefore, it makes this pull request a breaking change? Can we avoid that?

I don't think so. That has previously stopped other things in core from being converted to a class.

@anonrig anonrig force-pushed the string-decoder-refactor branch from e93f0f6 to c856ec5 Compare April 13, 2023 16:03
@anonrig
Copy link
Member Author

anonrig commented Apr 13, 2023

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 13, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@targos
Copy link
Member

targos commented Apr 17, 2023

Why did you abort the benchmark?

@anonrig
Copy link
Member Author

anonrig commented Apr 17, 2023

Why did you abort the benchmark?

@targos There was a more urgent benchmark at that time. I'll re-run it after I fix the errors in this current pull request, and CIGTM was aborted due to Node 20.

@anonrig anonrig force-pushed the string-decoder-refactor branch from c856ec5 to fd1ed71 Compare April 17, 2023 14:06
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@jasnell
Copy link
Member

jasnell commented Apr 17, 2023

Unfortunately I think we need to take this through a proper runtime deprecation cycle before we can make this change. There are older versions of iconv-lite, and I'm sure other modules that this will break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. needs-citgm PRs that need a CITGM CI run. semver-major PRs that contain breaking changes and should be released in the next major version. string_decoder Issues and PRs related to the string_decoder subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants