VS Code extension v0.12.0 beta release

We just released a first beta v0.12.0.beta.1 for the Julia extension for VS code here. We’d much appreciate it if we could get some testers to try it out and give feedback on bugs before we release it to the marketplace.

This release brings a number of new features and fixes along:

  • We added a grid viewer for tabular data. You can use it by calling the vscodedisplay function from the integrated REPL. You can pass pretty much any tabular data structure to that function, and then a grid view will open inside VS Code. You can also pipe tabular data into that function data |> vscodedisplay(). If a type either implements the TableTraits.jl interface, or has a show method for the application/vnd.dataresource+json MIME type, things will work with this display. The combination of these two should cover pretty much everything, so go ahead and try things like
using Queryverse

load("foo.csv") |> vscodedisplay()
load("foo.feather") |> DataFrame |> vscodedisplay()
load("foo.parquet") |> @filter(_.a>3) |> @mutate(d=_.a+_.b) |> vscodedisplay()
  • We finished our support for julia Julia environments. Every window has an active environment, and that will now be used for all IntelliSense that is provided by the language server, all tasks will pick up that enviornment, and of course the REPL as well. When you open a folder, the extension will auto-detect if there is an environment in that folder, and if so, activate that. There is UI provided to change the active environment, and such a change will be saved in the workspace settings, so that when you open the same folder again, the choice of active environment is remembered. Feedback on the particular UI choices, defaults etc. in this space would be really valuable.
  • When you run code with Alt-Enter, we no longer just paste that code into the REPL, but instead use a more sophisticated execution model. With that new model, things like @__DIR__ are properly resolved, function definitions retain accurate line numbers and the code won’t be echoed back to the REPL when you run it. This mode of code execution should also work much better with a lot of code. Ctrl-Enter is unchanged and will just copy-paste code into the REPL.
  • The Weave preview was broken lately because VS Code deprecated the API we had been using for that. We migrated the Weave support to the current API, so Weave preview should work again.
  • We added a test run task that outputs code coverage. If Coverage.jl is installed (ideally in your global v1.1 environment), we also write a lcov.info file into the root folder of your workspace. This is especially useful in combination with the excellent Coverage Gutters
    VS Code extension: it can show code coverage based on lcov.info inside VS Code.
  • We added experimental support for custom sysimages. This support has two parts: First, we added a new build task that will compile a custom sysimage for the current active environment that includes all the packages from that environment. Such a compiled sysimage is automatically stored as JuliaSysimage.dll (with platform specific extensions) alongside the Project.toml for the active environment. Second, if the useCustomSysimage configuration is set to true (the default is false), such a custom sysimage (if it exists and is newer than the Manifest.toml) will automatically be used for a new REPL session you start in VS Code. Overall this makes for a pretty smooth workflow: you can easily, with one command, compile a custom sysimage for a julia environment, and then any REPLs you start with that active environment will automatically use that sysimage. For some scenarios this can really solve a lot of the latency issues we have these days, but of course this is not perfect: building the sysimage is slow, there is no automatic rebuilding, the caching story for custom sysimages is very basic and I’m sure there are some other problems we haven’t discovered yet. So, keep in mind, this is an experimental feature! Oh, and you need to have PackageCompiler.jl installed for this to work, ideally in the default v1.1 environment.
  • A new command enables you to delete all plots in the plot pane.
  • We now preserve the REPL focus when a figure is displayed.
  • After you run the doc build task, we now open a web browser with the newly built documentation.
  • We now simultaneously support vega 3,4 and 5 and vega-lite 2 and 3.
  • One can now use ~ in the setting for the Julia binary.
  • We fixed the JULIA_EDITOR functionality on Mac.
  • @ZacLN fixed a very large number of issues in the language server. He might also have introduced new features that I am not aware of right now, I’ll let him mention any of those, if they exist :).

If you can, please opt into the crash reporting of the extension! It makes finding and fixing bugs a lot easier for us.

To try the beta download the VSIX file from https://github.com/julia-vscode/julia-vscode/releases/download/v0.12.0-beta.1/language-julia-0.12.0-beta.1.vsix and install using the Extensions: Install from VSIX… command.

Thanks,
David and Zac

46 Likes

this is awesome, thanks!

Thanks so much. Can you add the beta release to the VS Code extension store? I.e. add a preview package, I think other packages do something similar.

Do you know how I can ‘send to terminal’ using VS code? Instead of using the integrated terminal, I’d like to also be able to send the current file or highlighted text or a single line directly into the terminal, like in https://github.com/randy3k/SendCode.

I had looked into that at some point and I think it is too much hassle to set up. Also, there seems to be some movement to add first class support for pre-release publishing in VS Code itself, so I think our best bet is to just wait for that.

That doesn’t work right now, do you want to open an issue suggesting this?

1 Like

I’m getting a crash message form vs-code telling me the extension has crashed, without further information (I sent the info when asked though).

Thanks, that is super helpful and should hopefully be enough for us to figure out what is going on!

When I run code by Alt-Enter and I press Ctrl-C, it doesn’t interrupt the execution, is that expected?

Thank you for all the work, this is a great extension.

1 Like

Yes… Not great, but I don’t have an idea right now how to fix this… Could you open an issue about this so that we don’t forget it?

We have a beta 2 out. It has bug fixes and one new feature: you can now run code cells (marked by ##) with Shift+Enter.

Please give it a spin and report any issues back!

10 Likes

Thank you for all your work, I really appreciate that you put so much effort in this extension.
As a daily user, i would like to buy you a beer or donate in any other way. :beers:

4 Likes

@davidanthoff
Just want to let you know there are numerous Julia programmers out there who have real benefit from the extension every day and I am one of them. Thanks for your effort.

17 Likes

We have a first release candidate! Hopefully lots of bugs fixed and almost ready for a final release :slight_smile:

It would be awesome if many folks could test this build and report back any bugs you find and send crash reports if asked. We hope to ship a version before Juliacon, so this is the final stretch!

7 Likes

And we jump straight to RC.4.

At this stage, the most helpful thing for us is if as many folks as possible can install these updated release candidates and send crash reports if they come up. All the bugs we fixed lately came in via the crash reporting!

2 Likes

I’d like to re-emphasise how useful it is for people to enable/send in crash reports. I makes fixing bugs so much easier so please do it!

2 Likes

Ok. Installed in my laptop and ready to shoot crash reports. Thanks for the effort.

2 Likes

Can you please remind me which settings enable this (to the fullest extent)?

Hi, adding the following to your vscode settings.json will enable it:

"julia.enableCrashReporter": true,
"julia.enableTelemetry": true,

Z

2 Likes

thank you!

And we have a new release candidate 6 here.

Please install and send crash reports, we are almost there!!

When is the expected release to the VScode marketplace? If it’s relatively soon, I will wait to upgrade rather than manually installing the extension.

1 Like