You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The polyfill is the reflect-metadata module. This module overrides the Reflect global object. Every time the reflect-metadata is imported, the Reflect global is overwritten. This is a problem because this global object allows us to define metadata and it contains an internal WeakMap that stores the metadata. When the global is overwritten, the WeapMap is also overwritten and all the metadata is deleted.
If two extensions import reflect-metadata, one will remove the metadata created by the other.
We can fix this by changing the polyfill (reflect-metadata) source code but if some extension is using an outdated version or some extension is using a different polyfill we will have the same problem.
So I was wondering if it is possible for the vscode extensions runtime to isolate the globals between extensions? or prevent polyfill-related issues?
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.
So I was wondering if it is possible for the vscode extensions runtime to isolate the globals between extensions?
The idea is cool but I am afraid it's too late for that. We don't know what extensions/node_modules actually depend on something like that and we wouldn't wanna break them... The only option we have to fix this at the source, e.g at reflect-metadata
The official vscode python extension recently experimented some issues caused by a polyfill.
The polyfill is the
reflect-metadata
module. This module overrides theReflect
global object. Every time thereflect-metadata
is imported, theReflect
global is overwritten. This is a problem because this global object allows us to define metadata and it contains an internalWeakMap
that stores the metadata. When the global is overwritten, theWeapMap
is also overwritten and all the metadata is deleted.If two extensions import
reflect-metadata
, one will remove the metadata created by the other.We can fix this by changing the polyfill (
reflect-metadata
) source code but if some extension is using an outdated version or some extension is using a different polyfill we will have the same problem.So I was wondering if it is possible for the vscode extensions runtime to isolate the globals between extensions? or prevent polyfill-related issues?
cc: @DonJayamanne
The text was updated successfully, but these errors were encountered: