Skip to content

Commit a054532

Browse files
authored
Merge pull request #725 from JunoLab/avi/modal
release note
2 parents 5d4249c + b0c0835 commit a054532

File tree

6 files changed

+187
-2
lines changed

6 files changed

+187
-2
lines changed

lib/julia-client.coffee

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ commands = require './package/commands'
44
config = require './package/config'
55
menu = require './package/menu'
66
settings = require './package/settings'
7+
release = require './package/release-note'
78
toolbar = require './package/toolbar'
89
semver = require 'semver'
910

10-
# TODO: Update me when tagging a new relase:
11+
# TODO: Update me when tagging a new relase (and release note)
1112
INK_VERSION_COMPAT = "^0.12.3"
13+
LATEST_RELEASE_NOTE_VERSION = "0.12.0"
1214

1315
INK_LINK = '[`ink`](https://github.com/JunoLab/atom-ink)'
1416
LANGUAGE_JULIA_LINK = '[`language-julia`](https://github.com/JuliaEditorSupport/atom-language-julia)'
@@ -113,11 +115,21 @@ module.exports = JuliaClient =
113115
config: config
114116

115117
deactivate: ->
116-
x.deactivate() for x in [commands, menu, toolbar, @connection, @runtime, @ui]
118+
x.deactivate() for x in [commands, menu, toolbar, release, @connection, @runtime, @ui]
117119

118120
consumeInk: (ink) ->
119121
commands.ink = ink
120122
x.consumeInk ink for x in [@connection, @runtime, @ui]
123+
try
124+
v = atom.config.get('julia-client.currentVersion')
125+
if v isnt LATEST_RELEASE_NOTE_VERSION
126+
release.activate(ink, LATEST_RELEASE_NOTE_VERSION)
127+
else
128+
release.activate(ink)
129+
catch err
130+
console.log(err)
131+
finally
132+
atom.config.set('julia-client.currentVersion', LATEST_RELEASE_NOTE_VERSION)
121133

122134
consumeStatusBar: (bar) -> @runtime.consumeStatusBar bar
123135

lib/package/config.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ config =
591591
default: true
592592
order: 99
593593

594+
currentVersion:
595+
type: 'string'
596+
default: '0.0.0'
597+
order: 100
598+
594599
if process.platform != 'darwin'
595600
config.consoleOptions.properties.whitelistedKeybindingsREPL.default =
596601
['Ctrl-C', 'Ctrl-J', 'Ctrl-K', 'Ctrl-E', 'Ctrl-V', 'Ctrl-M', 'F5', 'F8', 'F9',

lib/package/menu.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ module.exports =
9898
{type: 'separator'}
9999

100100
{label: 'Debug Information', command: 'julia-client:debug-info'}
101+
{label: 'Release Note...', command: 'julia-client:open-release-note'}
101102
{label: 'Help...', command: 'julia:get-help'}
102103
{label: 'Settings...', command: 'julia-client:settings'}
103104
]

lib/package/release-note.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/** @babel */
2+
3+
import { CompositeDisposable, Disposable } from 'atom'
4+
import path from 'path'
5+
import fs from 'fs'
6+
import marked from 'marked'
7+
import { show } from '../ui/selector'
8+
import { readCode } from '../misc/paths'
9+
10+
let subs
11+
const RELEASE_NOTE_DIR = path.join(__dirname, '..', '..', 'release-notes')
12+
13+
export function activate (ink, startupNoteVersion) {
14+
const pane = ink.NotePane.fromId('Note')
15+
subs = new CompositeDisposable()
16+
17+
const showNote = (version) => {
18+
const p = path.join(RELEASE_NOTE_DIR, version + '.md')
19+
const markdown = readCode(p)
20+
pane.setNote(markdown)
21+
pane.setTitle(`Juno release note – v${version}`)
22+
pane.ensureVisible({
23+
split: 'right'
24+
})
25+
}
26+
27+
subs.add(
28+
atom.commands.add('atom-workspace', 'julia-client:open-release-note', () => {
29+
const versions = fs.readdirSync(RELEASE_NOTE_DIR)
30+
.filter(path => path !== 'README.md')
31+
.map(path => path.replace(/(.+)\.md/, 'v $1'))
32+
show(versions)
33+
.then(version => showNote(version.replace(/v\s(.+)/, '$1')))
34+
.catch(err => console.log(err))
35+
})
36+
)
37+
if (startupNoteVersion) showNote(startupNoteVersion)
38+
}
39+
40+
export function deactivate () {
41+
if (subs) subs.dispose()
42+
}

release-notes/0.12.0.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Hi all,
2+
3+
Juno 0.12 is out !
4+
Since we have ***tons*** of bugfixes and improvements for this release, here I'm going to pick some of the key highlights, but we hope you will like all the improvements and features added :)
5+
6+
7+
## Release notes
8+
9+
### New features
10+
11+
- Juno is now able to debug toplevel code, i.e. you don't need type `Juno.@enter` in REPL anymore ! ([Atom.jl#269](https://github.com/JunoLab/Atom.jl/pull/269), [atom-julia-client#683](https://github.com/JunoLab/atom-julia-client/pull/683), [atom-ink#255](https://github.com/JunoLab/atom-ink/pull/255), [atom-ink#256](https://github.com/JunoLab/atom-ink/pull/256))
12+
* You can use `Julia Debug: Run File (Block, Cell)` and `Julia Debug: Step Through File (Block, Cell)` commands (or corresponding menus) for debugging whole `.jl` file, selected code block, or even a Weave code cell, etc.
13+
* (showcase) Debugging toplevel code demo: ![toplevel code debugging](https://aws1.discourse-cdn.com/business5/uploads/julialang/original/2X/a/a16f97c17617e7fa383ff9bbb400b1f56ec7ca29.gif)
14+
- QoL improvements on profiler ([Atom.jl#244](https://github.com/JunoLab/Atom.jl/pull/244), [Juno.jl#463](https://github.com/JunoLab/Juno.jl/pull/463), [atom-julia-client#672](https://github.com/JunoLab/atom-julia-client/pull/672), [atom-ink#247](https://github.com/JunoLab/atom-ink/pull/247) – we internally use [FlameGraphs.jl](https://github.com/timholy/FlameGraphs.jl), thanks @tim.holy for suggesting this collaboration !):
15+
* Lines where dynamic dispatch or garbage collection happened are specially colored (yellow and red, respectively) so that we can find performance pitfalls more easily
16+
* Prunes stacktraces that relate to Juno's internal tasks by default
17+
* Fixed incorrect inline highlight lengths
18+
* Keyword option control for `@profiler` macro
19+
* (showcase) New profiler look example: ![Profiling example](https://aws1.discourse-cdn.com/business5/uploads/julialang/original/2X/2/262d39906c119347536d16c6decdb872080d9cad.png)
20+
- Provides smoother ways to run/debug a file from tree-view. You can use `Julia Client: Run File`, `Julia Debug: Run File` and `Julia Debug: Run File` commands and the corresponding menus within tree-view ([atom-julia-client#684](https://github.com/JunoLab/atom-julia-client/pull/684))
21+
* (showcase) New tree-view menus look: ![tree-view-menus](https://aws1.discourse-cdn.com/business5/uploads/julialang/original/2X/e/eea9a223a2f27388b4824e01f0b77cd11af9f468.png)
22+
- [Additional formatting options for JuliaFormatter.jl](https://domluna.github.io/JuliaFormatter.jl/dev/#Formatting-Options-1) can be specified via `Julia Options ⟶ Formating Options` config setting ([atom-julia-client#682](https://github.com/JunoLab/atom-julia-client/pull/682), [Atom.jl#259](https://github.com/JunoLab/Atom.jl/pull/259))
23+
- Added the `Julia Options ⟶ Format the current editor when saving` config option ([atom-julia-client#677](https://github.com/JunoLab/atom-julia-client/pull/677))
24+
- Code cells are highlighted, and cell detection logic gets improved ([atom-julia-client#674](https://github.com/JunoLab/atom-julia-client/pull/674), [atom-julia-client#675](https://github.com/JunoLab/atom-julia-client/pull/675))
25+
* If you don't like this, head for `UI Options ⟶ Highlight Cells` setting
26+
- The new command `Julia Client: Activate Enviroment In Parent Folder` (or `Juno ⟶ Enviroment ⟶ Enviroment in Parent Folder` menu) automatically searches a `Project.toml` file up from the current file's directory and then activate it if exist ([Atom.jl#241](https://github.com/JunoLab/Atom.jl/pull/241), [atom-julia-client#670](https://github.com/JunoLab/atom-julia-client/pull/670))
27+
- A terminal instance can be started from the current editor directory via `Julia Client: New Terminal From Current Folder` command (or `Juno ⟶ New Terminal ⟶ Current File's Folder` menu) ([atom-julia-client#657](https://github.com/JunoLab/atom-julia-client/pull/657))
28+
29+
### Improvements
30+
31+
- Juno's REPL and terminal now use [WebGL renderer for xtermjs](https://github.com/xtermjs/xterm.js/pull/1790) by default, which should bring us a vast improvement for rendering-performance ([atom-ink#242](https://github.com/JunoLab/atom-ink/pull/242), [atom-julia-client#660](https://github.com/JunoLab/atom-julia-client/pull/660))
32+
- LOTS of improvements around static analysis features (used for `Julia Client: Open Outline Pane`, `Julia Client: Goto Symbol` or clicking a name in the workspace view, etc.)
33+
* Modules are more correctly detected ([Atom.jl#215](https://github.com/JunoLab/Atom.jl/pull/215))
34+
* More memory efficient symbols cache ([Atom.jl#219](https://github.com/JunoLab/Atom.jl/pull/219))
35+
* Escape possible danger with recursive `include` loops ([Atom.jl#256](https://github.com/JunoLab/Atom.jl/pull/256))
36+
* Update to the latest version of [CSTParser.jl](https://github.com/julia-vscode/CSTParser.jl) ([Atom.jl#262](https://github.com/JunoLab/Atom.jl/pull/262))
37+
* Show local binding verbatim in completions ([Atom.jl#275](https://github.com/JunoLab/Atom.jl/pull/275))
38+
* ... and much more ([atom-julia-client#643](https://github.com/JunoLab/atom-julia-client/pull/643), [Atom.jl#205](https://github.com/JunoLab/Atom.jl/pull/205), [Atom.jl#206](https://github.com/JunoLab/Atom.jl/pull/206), [Atom.jl#208](https://github.com/JunoLab/Atom.jl/pull/208), [atom-julia-client#651](https://github.com/JunoLab/atom-julia-client/pull/651), [Atom.jl#220](https://github.com/JunoLab/Atom.jl/pull/220), [Atom.jl#221](https://github.com/JunoLab/Atom.jl/pull/221), [Atom.jl#268](https://github.com/JunoLab/Atom.jl/pull/268), [Atom.jl#272](https://github.com/JunoLab/Atom.jl/pull/272), [Atom.jl#273](https://github.com/JunoLab/Atom.jl/pull/273))
39+
- Performance improvements around Juno's GUI rendering:
40+
* Improved result animation ([atom-ink#244](https://github.com/JunoLab/atom-ink/pull/244))
41+
* Fixed idle CPU usage with plot open ([atom-ink#248](https://github.com/JunoLab/atom-ink/pull/248))
42+
- Improved mouse clicking behavior on inline results ([atom-ink#239](https://github.com/JunoLab/atom-ink/pull/239/files))
43+
* Now clicking an inline result with middle-mouse button will clear it
44+
* Fixed text selecting
45+
- Auto completion feature gets enhanced sooooo much:
46+
* General performance improvements ([Atom.jl#234](https://github.com/JunoLab/Atom.jl/pull/234))
47+
* Method completions now infer their return types using the current input argument types ([Atom.jl#276](https://github.com/JunoLab/Atom.jl/pull/276))
48+
* Lazy return type inference and result caching ([Atom.jl#278](https://github.com/JunoLab/Atom.jl/pull/278))
49+
* (showcase) Moar return type inference example: ![Inference example](https://aws1.discourse-cdn.com/business5/uploads/julialang/original/2X/0/045e20f86dedc3a14bd58a3d1cb51c8c1c6fe566.png)
50+
- Start to support more extensive precompilations (using [SnoopCompile.jl](https://github.com/timholy/SnoopCompile.jl)), which hopefully gives better first-time invocation speed for various features ([Atom.jl#270](https://github.com/JunoLab/Atom.jl/pull/270), [Juno.jl#476](https://github.com/JunoLab/Juno.jl/pull/476) – thanks @Amin_Yahyaabadi for taking the initiative on this !)
51+
- Better documentation search ([DocSeeker.jl#17](https://github.com/JunoLab/DocSeeker.jl/pull/17), [Atom.jl#232](https://github.com/JunoLab/Atom.jl/pull/232), [DocSeeker.jl#19](https://github.com/JunoLab/DocSeeker.jl/pull/19))
52+
- Clicking links in a REPL/terminal now needs `ctrl/cmd` modifier as in-editor symbol jump and prevents "random clicking on terminal" from opening a file ([atom-ink#251](https://github.com/JunoLab/atom-ink/pull/251), [atom-julia-client#678](https://github.com/JunoLab/atom-julia-client/pull/678))
53+
* If you don't like this change, you can restore the previous behavior by turning off the `Julia Client > Terminal Options > Ctrl/Cmd modifier for link activation` config setting:
54+
55+
### Bugfixes
56+
57+
- Cover edge cases in code block finding logic ([atom-julia-client#661](https://github.com/JunoLab/atom-julia-client/pull/661))
58+
- Fixed issues around menus ([atom-julia-client#671](https://github.com/JunoLab/atom-julia-client/pull/671))
59+
- Debug prompt now can accept multi-line expression ([Atom.jl#273](https://github.com/JunoLab/Atom.jl/pull/273))
60+
- Fixed focusing behavior with mouse hovering on inline results ([atom-ink#245](https://github.com/JunoLab/atom-ink/pull/245))
61+
62+
63+
## Installation
64+
65+
### Atom packages
66+
67+
***Important : To fully update Atom packages, you need to restart all the previous Atom processes***
68+
69+
Install the latest versions of `julia-client` and `ink` packages:
70+
Close all the Atom windows and type the following command into your terminal:
71+
```
72+
apm update
73+
```
74+
75+
If that also doesn’t work (or if you want to only update Juno packages), try the commands below instead:
76+
```
77+
apm uninstall ink
78+
apm uninstall julia-client
79+
apm install ink
80+
apm install julia-client
81+
```
82+
83+
### Julia packages
84+
85+
Execute the following in a Julia prompt:
86+
87+
```julia
88+
pkg> up Atom Juno
89+
```
90+
91+
### Versions
92+
93+
***Important*** : This release *requires* Atom 1.39, 1.40.1, or higher.
94+
95+
As always, make sure all Julia and Atom packages are up-to-date.
96+
97+
Julia packages:
98+
99+
* Atom.jl version: 0.12.8
100+
* Juno.jl version: 0.8.1
101+
102+
Atom packages:
103+
104+
* julia-client version: 0.12.3
105+
* ink version: 0.12.3
106+
107+
108+
That's all, thanks !
109+
110+
[Shuhei](https://github.com/aviatesk) and [Sebastian](https://github.com/pfitzseb),

release-notes/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Juno – release notes
2+
3+
This folder contains release notes of Juno.
4+
Those notes are also posted as [Julia Discourse](https://discourse.julialang.org/c/tools/juno).
5+
6+
The release notes will be automatically opened when an user has updated this package
7+
and the updated version has a release note.
8+
Also we can manually view a release note via `julia-client: open-release-note` command.
9+
10+
11+
## Developer notes
12+
13+
- in order for those features to work properly, release notes must be named under the rule: `major.minor.patch.md`
14+
- markdowns are parsed and transformed into HTML by [marked](https://marked.js.org/#/README.md) npm package
15+
- URLs should already exist somewhere; e.g. we should replace "upload://" when we use Discourse's image upload feature

0 commit comments

Comments
 (0)