Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

[Discussion] How to validate output formats in different runtimes #13

Open
caridy opened this issue Aug 11, 2015 · 0 comments
Open

[Discussion] How to validate output formats in different runtimes #13

caridy opened this issue Aug 11, 2015 · 0 comments

Comments

@caridy
Copy link
Contributor

caridy commented Aug 11, 2015

Invalid checksum in isomorphic apps

One of the most common issue filled against Intl.js and Format.JS is about invalid checksum, which will happen when the server (nodejs, iojs) formats a particular piece of data (date, time, number, etc.), but the output is different from what the client produces for the exact same call with the exact same data. This inconsistencies lead to some frameworks to warn about invalid checksum when rendering on browser. In React, this will invalidate the server-rendering, as it end up re-rendering the whole page on the client side because it does not have a way to conciliate the initial server side rendering with its internal checksum, which derivates from the state of the app.

Intl Implementations

Obviously, there is little we can do about this since different browsers, and server side engines, have their own implementation of ECMA402, and in some cases (like Microsoft's Chakra Engine) using its own data instead of CLDR. Also, keep in mind that test262 does not test the formatting output, it tests for the algo, and the internals of the Intl implementation.

Proposal

My proposal is to put together a comprehensive test suite that can be used by the various vendors to validate output formats, similar to test262, but focus on the full stack rather than just the algo steps. As a result, mozilla, microsoft, google and eventually apple could run this test suite in their respective pipelines.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants