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

Objects miss reference equality in bundles #832

Closed
Jand42 opened this Issue Oct 16, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@Jand42
Member

Jand42 commented Oct 16, 2017

It is caused by Object.Equals/GetHashCode declarations missing.

Default implementations of Object.Equals/GetHashCode specified separately from their actual proxy definitions because not every type will in WebSharper output will inherit WebSharper.Obj: F# unions/records and classes translated to plain objects with [<Prototype false>] will not, so they have structural equality.

Code dependency graph edges are not created for this hack, so bundling will miss including the method implementations, causing types inheriting WebSharper.Obj also default to structural equality.

Workaround: use <WebSharperDeadCodeElimination>False</WebSharperDeadCodeElimination> in your project file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment