-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
vscode.deprecated.d.ts #88391
Comments
Would it make sense to have potentially many of these Maybe we could either roll them out by version of deprecation ( |
Just to toss out another idea: At the other extreme, we could not publish any (we'd still likely use a |
My 2 cents: If the deprecated API has alternatives, we can remove it from |
With When it comes to breaking we have made a clear statement that we don't break the API. However, there is "binary compatibility" and "source compatibility", e.g "an extension written a long time ago still runs" or "an extension written a long time ago still compiles". That is two different things and we do break source compatibility from time to time, usually when being more expressive with TypeScript, e.g Still, is it worth the effort? In total there are just 14 deprecations. Binary compatibility won't allow us to remove implementations. To make matters more complicated we still need another, full definition file because we need that as compile-time check for the API implementation. How about tackling this from the tooling side? Not too long ago we have added |
Good points. Just deleting deprecated functions would workaround would simplify things since we would not have to worry about splitting the API between files. As @rebornix notes though, that may confuse extension authors (although I'm not sure it would be much worse in practice than moving symbols to a Here's the use case that inspired this: I would like to update We have two TS proposals for deprecation: microsoft/TypeScript#33093 microsoft/TypeScript#33092 We could push for TS to prioritize these if we feel we have a solid use case. At very soonest, they would likely be in the TS 4.0 timeframe (six months out) |
For microsoft#88391 Adds a new `ExtHostApiDeprecationService`. This service logs a warning and telemetry when a deprecated API is used. Updates some of the more simple deprecated apis to use this new service
For microsoft#88391 Adds a new `ExtHostApiDeprecationService`. This service logs a warning and telemetry when a deprecated API is used. Updates some of the more simple deprecated apis to use this new service
For microsoft#88391 Adds a new `ExtHostApiDeprecationService`. This service logs a warning and telemetry when a deprecated API is used. Updates some of the more simple deprecated apis to use this new service
* Add common service for logging deprecated api usage For #88391 Adds a new `ExtHostApiDeprecationService`. This service logs a warning and telemetry when a deprecated API is used. Updates some of the more simple deprecated apis to use this new service * Note that extensionId cannot be undefined * Fix event name
Telemetry showed that our built-in extensions were using deprecated APIs :) Looking over other numbers, both the We should discuss what we want to do with this information at the next API sync. I'm still wanting to remove the typings that let code action providers return |
Closing since we now have good deprecated support from TypeScript Additionally, as part of this issue we added telemetry and warnings for deprecated apis where possible |
Problem
As the VS Code api has expanded, we have marked a few APIs as deprecated to discourage their use. We have generally committed to support these old apis so that already published extensions will not break, even on newer VS Code versions. However, we do want extension to migrate off of these deprecated apis and we do not want new extensions using the deprecated APIs
By keeping the deprecated apis in our main
vscode.d.ts
, it may not be clear to extension authors what the best practices are in terms of API usage. An extension author may also now know when a better API comes along to replace one of the apis they were usingProposal
To address these issues, I propose we investigate gradually moving deprecated APIs from our main
vscode.d.ts
into a newvscode.deprecated.d.ts
file. We would continue to support these deprecated APIs just like we do now.This would have a few benefits:
When an author starts a new extension, they would never see the deprecated APIs and patterns
Extension authors would be notified when we deprecate an API (due to a compile time error after updating to a new
vscode.d.ts
version)It would slightly condense our main
vscode.d.ts
fileExtensions that really wish to continue using deprecated APIs could simply import
vscode.deprecated.d.ts
The text was updated successfully, but these errors were encountered: