[ANN] Juno 0.9

Hi all,

Juno 0.9 is out and brings you lots of bugfixes, improvements, and some exiting new features.
(Thanks for @pfitzseb for letting me take an release honour on behalf of him.)

Release notes

New features

  • On hover datatip: #145, #573
  • Jump to definition on click: #573

Improvements

  • Formatter now respects indent and line-length settings: 22449d5
  • Files can be opened in preview mode: #579, #208
  • Auto-completions show description for non-exported bindings and keywords: #147

Bugfixes

  • Fix the build problem within the latest version of Atom
  • Temporarily workaround Atom crash on OS notifications on macOS: #581
  • Fix progress-bar behavior at the final iteration: #337
  • InteractiveUtils.edit can now open non-Julia files: #146
  • Fix CI builds

Installation

Important: Restart Atom before updating julia-client or ink and do not start a Julia session.

If that does not work, close all Atom windows and type

apm update

into your terminal. If that also doesn’t work, try

apm uninstall ink
apm uninstall julia-client
apm install ink
apm install julia-client

instead.

Note: If you are on Linux and not using the official releases, it is possible
that you are still on an older version of Atom (e.g. 1.38) built with a new version
of Electron (which you can check with atom -v in a terminal; the official 1.38 release
is built with Electron 2.x). If that is the case you will also need this Juno release,
which you’ll need to explicitly install with

apm install julia-client@0.9.0

Versions

Important: This release requires Atom 1.39 or higher.

As always, make sure all Julia and Atom packages are up-to-date.

Julia packages:

  • Atom.jl version: 0.9.0
  • Juno.jl version: 0.7.1

Atom packages:

  • julia-client version: 0.9.0
  • ink version: 0.10.12

The experimental “On hover” features

Overview

Installation

Important: In order to enjoy the new “On hover” features, you need to install additional Atom packages by yourself:

Search and install atom-ide-datatip, atom-ide-markdown-service and hyperclick packages in File ⟶ Settings ⟶ Install within Atom, or run

apm install atom-ide-datatip atom-ide-markdown-service hyperclick

That’s it. You don’t need any additional settings other than that.

Usage

Let’s start Atom, fire up Julia and bring your cursor on some word you want to inspect.
If documentation bindings exist for it, the documentation would appear. Additionally you can click the word while pressing ctrl key (on macOS cmd key) and jump to its definition.

Uninstallation

If you don’t like these features, just uninstall the additional packages:

apm uninstall atom-ide-datatip atom-ide-markdown-service

Then, you won’t have any effect from these features.

Notes

Since these “On hover” features are very experimental, we would appreciate your feedbacks.
In our current plan, we are very likely to drop the need for the above package dependencies (especially atom-ide-datatip and atom-ide-markdown-service), and thus UIs can change significantly in the future.

20 Likes

Additional side note

If you’re an user of atom-ide-ui, you can just keep using it instead of the packages above (atom-ide-datatip, atom-ide-markdown-service and hyperclick) in order to use “On hover” features in Juno.

If you go with atom-ide-ui, I highly recommend you disable unnecessary modules within its settings (File ⟶ Settings ⟶ Packages ⟶ atom-ide-ui ⟶ Enabled Features) to shorten its activation time.
When just using Juno’s “On hover” features, you can disable all the features other than Datatips, atom-ide-global features and hyperclick feature.

1 Like

I just updated and tried the hover feature on Windows. Although I generally like the feature, it feels like I can’t place my cursor anywhere without a popup showing up (it even pops up if it didn’t find documentation for a thing). Perhaps it’s better to bind this to somekey+hover or so?

Also, for my taste, the popup isn’t disappearing fast enough when I unhover a word. I’d like it if it were really snappy.

As to the ctrl+click to go to definition feature, it appear to be not working reliably for me. Base.size, Base.length, and a bunch of self-defined functions all don’t seem to work. On the other hand, @boundscheck did work for some reason. Is this expected at this early stage?

Anyways, thanks for the continuous great work!

2 Likes

Yeah that’s the reason why we want our own UI for that – I don’t really like what atom-ide-datatip is doing much either.

No, that shouldn’t be happening. Can you try Ctrl-J Ctrl-G for those cases? If that works then I have a fix on julia-client master.

Yes, Ctrl-J Ctrl-G works (it shows me a popup list of methods I can jump to).

Unrelated to this, is there a way to have the Julia process in the console start automatically on Atom startup?

In your init.js script, you can have something like:

atom.packages.onDidActivateInitialPackages(() => {
  atom.commands.dispatch('atom-workspace', 'julia-client:open-a-repl');
  atom.commands.dispatch('atom-workspace', 'julia-client:start-julia');
})

and then this would do the work.
(I’ve not tested that tho)

If you’re using the Process Cycler then we’re already technically starting the Julia process when Atom is started, we just don’t show you. Do open an issue if you’d like to see this changed :slight_smile:

It says, unexpected .

1 Like

You can try

atom.packages.onDidActivatePackage (p) ->
  if p.name is 'julia-client'
    juno = p.mainModule
    juno.connection.boot()

since you seem to still have a init.coffee.

3 Likes

Works, thanks!

Alright, that bug should be fixed with julia-client 0.9.1.

I find the new hover feature great :smiley:
It breaks very easily though, in some files it shows nothing at all for any symbol (the progress bar indicator flickers for a second or so), whereas in other files it works well. It does not have anything to do with the contents of the file, as if I copy everything and paste it in a new file, it works. Edit: actually, copying all text in the file and pasting it into the same file solves the problem as well :stuck_out_tongue:

Thanks for your report :slight_smile:

I’ve never seen this issue while the development. Can’t you get hovers even for keywords begin ?

If you’re talking about documentation bindings within specific modules, still I made on-hover features “module-sensitive” for every opened files, thus I wonder in which situation you happened to face the problem.

Once hover stops working for a file, I can not get any popups for anything, not even keywords. Hovering seems to stop working whenever an exception has been thrown by code evaluated in a particular file. If I copy-paste contents of a file to make sure hover is working, and then evaluate the line (ctrl+enter)

error()

hover stops working.
Edit: I’ve narrowed it down to hover not working whenever there is something marked red in the file, such as the result from error() above. If I clear that result, it works again

1 Like

Yeah, I can repro that. That’s a bug with atom-ide-datatip… one more reason to implement this properly ourselves.

2 Likes

The latest updates (julia-client 0.9.4 and Atom.jl 0.9.1) bring a few more bugfixes:

  • Meta-Enter now works as intended in terminals (#585, thanks to @NHDaly for the help).
  • More error handling for datatips (#583).
  • Closing parens/brackets/curlies are treated like end when determining what code to evaluate (#587). That allows e.g.
    this
    to just work.
  • The keybindings shown in the toolbar’s tooltips are now correct on all systems (#339).
  • Size of inline results is now more aggressively limited, so there should be no more crashes/hangs when trying to display large results inline or in the workspace (#221 and #318).
15 Likes

Gotta say Juno now feels alot snappier! Thanks for big improvements!

6 Likes