-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
How to improve extension author experience dealing with vscode- to @vscode npm module change #140585
Comments
I'm not sure that we are. This is pretty dangerous internal use from the get-go and I would hope is pretty rare.
This isn't being required, instead it's pulled from the app installation directory: https://github.com/Gruntfuggly/todo-tree/blob/dfd91634b8047614644e5161c588d595b2100ac6/src/config.js#L97-L107 Hence the extra danger and hopeful rarity. We could preserve the install structure, but the structure of the app folder is not contract we ever intended to have so I dislike treating it as such... |
I know there are several internal and at least this one using No one told the author how to do that. It would make sense to me that ripgrep would also see similar usage since searching text is a big use case for extensions and working with native modules in extension also isn't really supported (you can but it's a pain). |
👀 https://github.com/search?q=getCoreNodeModule&type=code Just looking at the results page (not digging in when it's not obvious) I see a bunch of uses for keytar, vscode-oniguruma, vscode-textmate, windows-process-tree and node-pty. That doesn't includes the majority of those 7 pages of results, and also doesn't include if the function/mechanism they used was not named exactly |
If we want to have this be "contract", perhaps we actually expose |
I kind of like the "soft contract" similar to commands, we're not technically restricted from making breaking changes (I wouldn't want node-pty to never have breaking changes). By using that Just here, we should be careful about not causing a bunch of broken extensions because we are able to. I'm not saying support |
This sounds good. I'll implement this and then link the relevant code here so that, as others migrate their packages, they can add aliases. |
Ok, so one note -- aliasing require is fine which would make |
Yeah I wouldn't do anything there either, but we can catch the common code snippet at least |
It looks like vscode-ripgrep actually exports the |
Here's the template I posted and all repos I could find who use ripgrep in this way:
And the aliases: vscode/src/vs/workbench/api/common/extHostRequireInterceptor.ts Lines 97 to 104 in 3d1576a
|
@connor4312 oh is vscode-textmate and vscode-oniguruma not republished yet? |
Not yet |
We're probably going to get a bunch of extension issues like this: Gruntfuggly/todo-tree#595
Should we:
vscode-
when requiring to automatically fix the problem?I know the modules we ship with the product are not "public API", but there are many extensions that do use them.
The text was updated successfully, but these errors were encountered: