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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamically updating full-icu #51

Closed
bcoe opened this issue May 7, 2020 · 3 comments
Closed

dynamically updating full-icu #51

bcoe opened this issue May 7, 2020 · 3 comments

Comments

@bcoe
Copy link

bcoe commented May 7, 2020

馃憢 I'm helping a user in a dynamic runtime environment, where their process is sometimes restarted on a newer Node.js verison, e.g., v12.1.0 -> v12.2.0, without a full deploy of the service.

This has been causing issues with full-icu, as ICU expects a data file paired to the Node.js version.

I was thinking of giving the advice of running a script like this:

#!/usr/bin/env bash

mkdir -p /tmp/icu/node_modules
cd /tmp/icu
VERSION=$(node -e 'console.info("icu4c-data@"+process.config.variables.icu_ver_major+process.config.variables.icu_endianness)')
npm i $VERSION

As a prestart script in their npm module, such that, in these situations where Node has been updated underneath them, they end up with a working version of icu4c-data.... my concern. was that this would lead to slower cold start times.

I was wondering if you have any advice, have seen similar approaches, or know of libraries that would do some of this work for the user?

@srl295
Copy link
Member

srl295 commented Jul 8, 2020

Hm. Maybe instead of invoking node, just take a quick checksum on which node or something? then you could have an empty .ok/1234abcd file as a marker that you've run npm i full-icu for that version?

@bcoe
Copy link
Author

bcoe commented Jul 8, 2020

@srl295 thanks for the follow up. Ultimately, we decided that rather than directing the customer to dynamically update full-icu, we'd ship Node.js with full ICU support. We're in a healthy place now 馃槃

@bcoe bcoe closed this as completed Jul 8, 2020
@srl295
Copy link
Member

srl295 commented Jul 8, 2020

馃帀
Everyone wins. Even those being paid for bandwidth and disk space:)

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

No branches or pull requests

2 participants