-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Consider updating tsc target #1712
Comments
I found python extension is using ES2018. Is there any other popular extensions that picked up more recent targets? I contacted one of our internal TheiaIDE based product users for comment. |
The relationship between ECMAScript versions and what features are supported natively is not clear to me. But the feature I'm most interested in is native async, because it removes the async generator shims. By testing different values in If you search for 'es20' on caniuse.com (link), support for async functions is shown under ES2017/ES8. Async generator/iterators appear to be an ES2018/ES9 feature, though I don't think the extension is using those. With respect to Theia and browser support, all major browsers (edge, chrome, firefox, safari, and opera) have natively supported async functions since 2016 or 2017 (link). The situation appears similar for other ES2017 features (link), so upgrading to ES2017 is unlikely to cause major issues. Some (major) browsers do not yet fully support ES2018 (link), and those that do have supported it since around 2020. |
Change https://golang.org/cl/356509 mentions this issue: |
Looks like this is done. |
Fixes #1712 Change-Id: I6f90cff70178e6193a96fd6212a26d67746b2f51 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/356509 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com>
The current tsc target, ES6, results in generator-based awaiter code. Compared to native async/await code, this adds to the compiled output size and makes debugging more difficult.
VSCode supports much more recent ECMAScript targets. For example, VSCode 1.52 uses Electron 9.3, according to VSCode's package.json; Electron 9 uses Node 12.14, according to the release notes; Microsoft recommends ES2019 for Node 12.
Reasons I can think of not to upgrade the tsc target are: other IDEs such as Theia and browser-based systems like GitPod.
The text was updated successfully, but these errors were encountered: