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
mwpenny opened this issue
Dec 4, 2020
· 5 comments
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseverifiedVerification succeeded
The line with my added "problem" comment will trigger some getters which include checkProposedApiEnabled() and cause the extension to fail to load with the "Proposed API is only available..." error even though it may never access the relevant properties. Later versions of TypeScript use a getter to defer property access and this isn't a problem.
Technically, I'd call this a TypeScript/tslib bug and not a VSCode bug. It's fixed in later versions of TypeScript (or worked around by changing the imports to import vscode from "vscode"), but I figured you'd like to be made aware since this could cause problems for a number of existing extensions.
The text was updated successfully, but these errors were encountered:
@mwpenny Thanks for the detailed bug report. This is super helpful. What's has changed recently is that I added proposed-api checked for proposed types, e.g we have a new proposed class vscode.TimelineItem and accessing this new type is now also guarded by a proposed API usage check.
jrieken
added
bug
Issue identified by VS Code Team member as probable bug
candidate
Issue identified as probable candidate for fixing in the next release
labels
Dec 9, 2020
I believe in addition to an old TS version <3.9 this also needs the following compiler option: "esModuleInterop": true. Without those two, I wasn't able to reproduce... @mwpenny Please confirm my finding.
Anyways, the following extension doesn't actually use proposed API but uses the bogous __importStar-utility and consequently fails to load: ts39-proposed-0.0.3.vsix.zip.
@jrieken Thanks for the quick response. You're right that you also need "esModuleInterop": true. The project which alerted me to the problem has this compiler option set.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releaseverifiedVerification succeeded
Steps to Reproduce:
import * as vscode from "vscode"
Does this issue occur when all extensions are disabled?: Yes
Note that this only happens on insiders.
Recent changes (c219b06) cause problems for extensions built with old versions of TypeScript (< 3.9). With these old versions
gets emitted as:
The line with my added "problem" comment will trigger some getters which include
checkProposedApiEnabled()
and cause the extension to fail to load with the "Proposed API is only available..." error even though it may never access the relevant properties. Later versions of TypeScript use a getter to defer property access and this isn't a problem.Technically, I'd call this a TypeScript/tslib bug and not a VSCode bug. It's fixed in later versions of TypeScript (or worked around by changing the imports to
import vscode from "vscode"
), but I figured you'd like to be made aware since this could cause problems for a number of existing extensions.The text was updated successfully, but these errors were encountered: