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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache unicodeData.txt #18

Open
oliversalzburg opened this issue May 8, 2015 · 5 comments
Open

Cache unicodeData.txt #18

oliversalzburg opened this issue May 8, 2015 · 5 comments

Comments

@oliversalzburg
Copy link

When installing packages that rely on this packages on Windows, the data will be pulled from unicode.org every single time the package is installed.

Not only is there no directory in systemfiles that would fit a Windows environment, the data that is retrieved isn't cached either :(

@dodo
Copy link
Owner

dodo commented May 9, 2015

Since i don't have a windows system, i'm unsure how to solve this issue.
The txt file could be written to a globally accessable space (like ~/.cache under linux), but i'm not sure if that would solve the problem or just simply create new ones.

Would you mind creating a pull request?

@oliversalzburg
Copy link
Author

@dodo I'll look into how the process works and submit a suggestion :)

@oliversalzburg
Copy link
Author

I would assume that using ~/.cache is a viable option. Combined with home-dir, it should work cross-platform.

A possible problem that came to mind was, that the cached data could get outdated and that would impact future installations of node-unicodetable, but the same is true for existing approaches that reference files in /usr/share.

However, I could see how caching in that location might lead to unexpected results. Someone might reinstall node-unicodetable and be confused why the data isn't updated, because they weren't aware of this cache. This is less likely to happen with data that is pulled from official packages for the distribution.

I'd still consider it beneficial if something like ~/.cache/unicodetable/UnicodeData.txt was checked for existing data. That way, someone might place the file there manually.

I'm aware of the ability to set an environment variable to point to any location you wish, but I personally wouldn't want to constantly have a variable in my environment that is only relevant when I install this package.

@zenlambda
Copy link

I've noticed that OS X El Capitan doesn't include UnicodeData.txt in /usr/share/unicode/ or /usr/share/unicode-data/, so the postinstall phase will pull from unicode.org every single time just like Windows.

I can't even put the file there without disabling system integrity protection. 🙁

@GFoley83
Copy link

@dodo Are you still supporting this repo? There's 6 open issues relating to not being able to install UnicodeData.txt due to external constraints (e.g. corporate environments, proxies, firewalls etc).

Is there any way you could just include UnicodeData.txt so that is comes with the module at install time?

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

4 participants