-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Intl: Consider deprecating Intl.v8BreakIterator #8865
Comments
Makes sense… is there a need to deprecate something that's really v8 internal? So I'm +0.0 on this subject to rounding err! |
I hope no one new starts using the deprecated API, but it's currently exposed to some Node users. I'd support a runtime deprecation warning but would be even happier if it were just deleted. I hope to remove it entirely from a future version of V8. |
Deletion makes sense too. I'm +1 on principle just not sure about policy details. Enviado desde nuestro iPhone.
|
We have to deprecate first in one major before we can remove in the next. On Saturday, October 1, 2016, Steven R. Loomis [email protected]
|
Makes sense
|
@srl295 I thought we had discussed this in the past, and agreed on throwing an error, at least that was my understanding. Anyhow, let's try to take action asap, to prevent a bigger problem later on. |
If there is a chance this will be removed before the next major we should deprecate in v7. |
I'm thinking we probably should. I'm not able to add the ctc-agenda label On Monday, October 3, 2016, Jeremiah Senkpiel [email protected]
|
Here is a PR adding the deprecation warning: #8908 |
One real problem here is that if The problem here is the speculative nature of the problem here.
and
What timeframe might we be talking about? Would this depend on TC39? What if |
Some discussion at CTC meeting, lots of uncertainty still, @littledan is on vacation for a few weeks apparently. This should come back on the agenda. |
@s3ththompson: "won't be deprecating it until Intl.Segmenter makes it in, but would be happy for Node to remove it to be forward-looking, particularly since it only impacts a subset of users." |
At the very least, adding the deprecation warning is the right thing to do On Wednesday, October 5, 2016, Rod Vagg [email protected] wrote:
|
Fixes: #8865 PR-URL: #8908 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
To give a little more context on top of what @s3ththompson, |
It was never an official Ecma-402 API, it is about to be superseded by `Intl.Segmenter` and it's prone to crash under some circumstances. Searches don't turn up any usage in the wild and the recommendation from the V8 team is to remove it. Now seems like a good a time as any to do that. Fixes: nodejs#8865 Fixes: nodejs#14909 Refs: https://github.com/tc39/proposal-intl-segmenter Refs: https://chromium-review.googlesource.com/c/v8/v8/+/620755
It was never an official Ecma-402 API, it is about to be superseded by `Intl.Segmenter` and it's prone to crash under some circumstances. Searches don't turn up any usage in the wild and the recommendation from the V8 team is to remove it. Now seems like a good a time as any to do that. Fixes: #8865 Fixes: #14909 Refs: https://github.com/tc39/proposal-intl-segmenter Refs: https://chromium-review.googlesource.com/c/v8/v8/+/620755 PR-URL: #15238 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
It was never an official Ecma-402 API, it is about to be superseded by `Intl.Segmenter` and it's prone to crash under some circumstances. Searches don't turn up any usage in the wild and the recommendation from the V8 team is to remove it. Now seems like a good a time as any to do that. Fixes: nodejs#8865 Fixes: nodejs#14909 Refs: https://github.com/tc39/proposal-intl-segmenter Refs: https://chromium-review.googlesource.com/c/v8/v8/+/620755 PR-URL: nodejs#15238 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Hi all, I'm looking to integrate segmentation in some node (v10) code. From what I understand after a twitter chat with @srl295, How would you recommend I use these APIs in node? Am I just stuck with an older version that supports Secondly, would also love to understand why this feature was completely removed before a suitable replacement was approved? Or am I misunderstanding something? Thanks for your time. |
if you only need en-US, this should work. https://gist.github.com/inexorabletash/8c4d869a584bcaa18514729332300356 |
@devsnek Unfortunately en-US is the least of my worries. Mostly working with CJK languages. |
Because it wasn't actually a Node.js feature. It was an unsupported, lightly documented A couple of other interim options which link against another copy of ICU4C might include: https://www.npmjs.com/package/node-icu-tokenizer or https://www.npmjs.com/package/icu-wordsplit — maybe these could be made to work with the new API. |
Ah, that makes sense then. Thanks for the explanation. That would also explain why it's been so impossible to find documentation for that function :) |
It used to be documented in a Google Code repository, but that was removed when Google Code was shut down, and I'm not sure where to find it in the Internet Archive :( |
@littledan My mistake! I updated my commend above with a link to the docs ☝️ |
@littledan has put forward a TC-39 proposal to introduce
Intl.Segmenter
as a standardized replacement for the V8 specificIntl.v8BreakIterator
.Currently in Node.js,
Intl.v8BreakIterator
only works if the full-icu data is being used. Attempting to create an instance ofIntl.v8BreakIterator
with the default small-icu with throw. That said, given the desire to replace it with a standardized alternative we should consider emitting a runtime deprecation warning when it is used./cc @srl295 @caridy @nodejs/ctc @nodejs/tc39
The text was updated successfully, but these errors were encountered: