This article is more than 1 year old

It's been a lean month for Microsoft's Visual Studio Code, but look! Remote Development

Also: Accidental explosion in TypeScript type-checking de-borked in version 3.5

Microsoft kept up the cadence of its Visual Studio Code emissions with a shrivelled April update due to the altogether more exciting arrival of Remote Development.

A lean April with good cause

Disappointment that there weren't more toys in Microsoft's open-source code editor after March's bumper release was tempered by other enticing technology, but the gang was still able to administer a little tinkering.

The bouncing of CodeLens lines when switching editors has been resolved in this release (to be fair, we didn't really notice the problem in earlier versions) although the tweak to make CSS values prefixes with a dash '-' drop beneath those with a vendor-prefix is most welcome. Microsoft cites the example of '-ms-grid' now dropping below 'grid' in auto-completion.

Of course, real CSS programmers use notepad.exe to carefully handcraft their stylesheets, right?

Additional useful modifications include a new option in the Terminate Task command to, well, nuke everything running from orbit. The ability to automatically show the Problems panel has also been added with options to keep the thing visible, show it when there is a problem or keep it hidden.

Other than enhancements to make debugging more than one extension at a time a bit easier, the team is almost apologetic that it spent more hours getting the Remote Development extensions into Preview (doubtless with the deadline of Build 2019 hanging over its head).

Home and away, the Remote Development way

Remote Development is a good excuse for a light April. The technology, still in preview and requiring the Insider version of VS Code, allows developers to work in a local VS Code instance, but with the code itself running elsewhere. This is in response to the situation where developers either try and recreate the target environment locally (tricky when targeting something in the cloud) or give up rich tools like VS Code when it comes to working remotely.

And Microsoft really doesn't want you giving up VS Code now it has your attention.

To that end, the gang introduced three extensions.

The first, Remote – WSL, is all about the flavour of the month at Redmond, the Windows Subsystem for Linux. Pointing the extension at a WSL instance means that Windows can be used for development, replete with platform-specific tools, but commands and extensions are run within the Linux distro.

Remote – SSH extends this, allowing folders and workspaces to be opened on a remote machine, VM or container running a SSH server. This means that your local VS Code could be used to debug an application running somewhere else, like the cloud.

Finally, Remote – Containers is all about using a Docker container as a developer container. Again, this means coders can develop on the OS to which they are deploying, replete with the delightful isolation of containers. And also never leave the warm embrace of VS Code.

It's all very preview stuff at the moment but as an excuse for fewer baubles in the VS Code box this month, we'll happily take it.

TypeScript 3.5 hits release candidate status

The developer tools gnomes within the bowels of Redmond also emitted a release candidate of TypeScript 3.5, which will run with Visual Studio 2017, 2019 and, of course, Visual Studio Code.

With a mea culpa for leaving TypeScript 3.4 a little borked in terms of compile time (colourfully, the team explained it had "accidentally introduced a regression that could lead to an explosion in how much work the type-checker did"), the gang has worked on optimising things and reckon that certain functionality is actually faster than version 3.3.

The team reckons that editor operations should be a good deal snappier as well, describing the editor experience for users affected by the 3.4 borkage (the most impacted were those using the styled-components library) as "unbearable".

Optimisations aside, the update also performs smarter union type checking, where TypeScript 3.5 will dig deeper when assigning to types with discriminate properties, decomposing types into a union of every possible inhabitant rather than simply vomiting up a potentially unhelpful error.

The team has also added higher order type inference from generic constructors.

However, caution must be exercised with the release candidate as there are a number of breaking changes to catch out the unwary. 3.5 is stricter when it comes to property checks on the constituents of union types, unsound writes to indexed access types will throw errors and generic type parameters are implicitly constrained to unknown.

The latter could cause problems – the previous behaviour was that the empty object type {} was used and unknown is a bit of a different beast. The other breaking changes can mostly be worked around if needs be and will usually be caused by errors in the source being caught by tightened-up checking.

The final release should be with us by the end of the month. ®

More about

TIP US OFF

Send us news


Other stories you might like