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

Prototype changes on global JS objects may break other extensions #20043

Closed
yotamofek opened this issue Oct 20, 2022 · 2 comments
Closed

Prototype changes on global JS objects may break other extensions #20043

yotamofek opened this issue Oct 20, 2022 · 2 comments
Labels
area-editor-* User-facing catch-all debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on

Comments

@yotamofek
Copy link

yotamofek commented Oct 20, 2022

See rust-lang/rust-analyzer#13442 for an instance of a polyfill set (globally) on String's prototype breaking another extension. The polyfill was added here: #17582

I think that making any changes to any prototypes that may affect other extensions is probably something to be avoided and can be easily avoided by using regular "free" functions.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 20, 2022
@karthiknadig karthiknadig added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. area-editor-* User-facing catch-all needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Oct 20, 2022
@karthiknadig
Copy link
Member

We should move all prototype extensions to independent functions to avoid this kind of problem. They are all defined here:
https://github.com/microsoft/vscode-python/blob/main/src/client/common/extensions.ts

@karrtikr
Copy link

Closing in favor of #18871

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

3 participants