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

Give specific error on not finding proxies for decimal/bigint/Complex #962

Open
Jand42 opened this issue Jun 15, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@Jand42
Copy link
Member

commented Jun 15, 2018

These are the 3 numeric types that are proxied outside of WebSharper.Main: by WebSharper.MathJS which is in a separate nuget package. Compiler could give error telling to include that package reference when using those types instead of the usual "not found in JavaScript compilation" error.

@Jand42 Jand42 added the enhancement label Jun 15, 2018

@granicz

This comment has been minimized.

Copy link
Member

commented Oct 5, 2018

I am getting this when trying to use a decimal in an RPC:

WebSharper.Main.js?h=1127374076:269 Uncaught TypeError: Cannot read property 'CreateDecimalBits' of undefined
at decode (WebSharper.Main.js?h=1127374076:269)
at Object.Arrays.map (WebSharper.Main.js?h=1127374076:2364)
at Object.Json.shallowMap (WebSharper.Main.js?h=1127374076:316)
at decode (WebSharper.Main.js?h=1127374076:255)
at Object.Arrays.map (WebSharper.Main.js?h=1127374076:2364)
at Object.Json.shallowMap (WebSharper.Main.js?h=1127374076:316)
at decode (WebSharper.Main.js?h=1127374076:258)
at Object.Json.Activate (WebSharper.Main.js?h=1127374076:310)
at WebSharper.Main.js?h=1127374076:430
at XMLHttpRequest.k (WebSharper.Main.js?h=1127374076:482)
@Jand42

This comment has been minimized.

Copy link
Member Author

commented Oct 5, 2018

@granicz Thanks, this shows that if decimal is not used in the client-side, other than receiving it as an RPC result, this is currently not caught by the compiler but results in a run-time error.

Adding reference to WebSharper.MathJS package should resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.