-
Notifications
You must be signed in to change notification settings - Fork 794
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
LanguagePrimitives error strings are initialized in default culture before usage in different culture #159
Comments
the SR.GetString use CultureInfo.CurrentUICulture, so need to be invoked at runtime not bound when the module ErrorStrings is opened
Re-opening this one as the fix was rolled back before 4.0 |
@latkin do you remember why this was rolled back? |
@forki because i changed the function to be lazy loaded. But that was a breaking change for binary api ( these function are inlined inside the compiled assembly ), so assemblies compiled with old fsharp.core but using newer fsharp.core didnt find the functions => runtime crash. I fixed this issue with #694 , but is should wait for next fsharp.core major version (5?). That's because code compiler with So let's wait fsharp.core 5.0 😄 |
I'm closing this as Wont Fix. The problem is in practice very minor, and the original fix was rolled back because it would necessitate a breaking change |
Ref #141
Some localized error strings in prim-types.fs are declared as module values, which causes them to be statically initialized long before they might be used. This means they might be initialized in a different culture than when they are actually used, which is not desirable.
Fix is to refactor these to be evaluated on-demand.
The text was updated successfully, but these errors were encountered: