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

Versioning and compatibility #11

Open
alexanderedge opened this issue Feb 3, 2020 · 7 comments
Open

Versioning and compatibility #11

alexanderedge opened this issue Feb 3, 2020 · 7 comments

Comments

@alexanderedge
Copy link
Contributor

We had a brief conversation about versioning and compatibility between the native clients and the webview, so I thought we should get something in writing about how we're going to handle changes to the WebView / Native Thrift API over time.

@alexanderedge
Copy link
Contributor Author

We've got nativeThriftPackageVersion on the native side and webviewThriftPackage on the webview side. How are these version numbers set currently?

Here are possible scenarios:

Rendered page version Native version Outcome
1 1
1 2 ⚠️ native layer may not be able to call functions on the page
2 1 ⚠️ page may not be able to call functions on the native layer

Over time, is it possible to avoid a hot mess of if version >= 𝑥 throughout the native and JS code?

@alexanderedge
Copy link
Contributor Author

cc @maxspencer @ChrisOwen101

@alexanderedge
Copy link
Contributor Author

We've got nativeThriftPackageVersion on the native side and webviewThriftPackage on the webview side. How are these version numbers set currently?

This might be a warning that we need thorough documentation with which functions are supported by which versions.

@alexanderedge
Copy link
Contributor Author

This is also linked to #12, since if the native layer never calls functions on the web page, then one of the scenarios above is impossible.

@webb04
Copy link
Contributor

webb04 commented Feb 12, 2020

Can't we assume that the rendered page version will always be >= nativeVersion?

@alexanderedge
Copy link
Contributor Author

If a new build of the app accesses a rendered page that is cached by Fastly, then could this happen?

@webb04
Copy link
Contributor

webb04 commented Feb 14, 2020

Hmm yeah, maybe we put a hash on renderedItem url so that when the JavaScript changes, that cache is invalid?

We do have version numbers available to each other but it won't be nice to have if statements everywhere. We should build it so that if the function doesn't exist, nothing happens.

I think the majority of cases will be the webview calling into the native layer?

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

2 participants