webaudiomodules / api

Web Audio Modules (WAMs) API
176 stars 15 forks source link

Namespace all types by their API version #16

Closed boourns closed 2 years ago

boourns commented 2 years ago

🔴 FOR DISCUSSION 🔴

I'm exploring an approach for the WAM2 API/SDK to support WAMs built with older versions of the API/SDK.

The general idea is that, when an older WAM is loaded, WamEnv will need to wrap the older WAM with a shim object that implements backwards compatibility, so that the rest of the system can treat the old WAM as if it were built with the current SDK version.

One requirement to do this easily will be to know the typescript definitions for older WAM SDKs. So the idea here is, each API version defines its types inside a Vx.y.z namespace, and then the API exposes the "current" versions.

I'm interested in your thoughts, alternative approaches, whether you agree this is a problem we need to solve, ...

Some things I'm uncertain about:

Next steps, other problems that would need to be solved as well:

boourns commented 2 years ago

I think I found a less intrusive way to implement a shim for WAMs built with older SDKs, so closing this