Skip to content

Commit 50a934b

Browse files
authored
Fix source install (#526)
* Add a job to verify source install * Add @jupyterlab-classic/application to peer dependencies * Adding as peer-dependency did not help, entering debug mode * Try to use peerDependenciesMeta * Remove peerDependency(Meta) for classic * Revert to safe use of app.shell with type casing and type import * Restore smoke job * Add changelog entry * Re-activate atest
1 parent e13e08c commit 50a934b

File tree

3 files changed

+54
-18
lines changed

3 files changed

+54
-18
lines changed

.github/workflows/job.test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,3 +389,45 @@ jobs:
389389
jupyter server extension list
390390
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
391391
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
392+
393+
source:
394+
name: smoke source install ${{ matrix.os }}
395+
runs-on: ${{ matrix.os }}-latest
396+
needs: [build]
397+
strategy:
398+
fail-fast: false
399+
matrix:
400+
os: [ubuntu]
401+
python: ['3.6']
402+
nodejs: ['14']
403+
lab: ['>=3.0.0,<4.0.0a0']
404+
steps:
405+
- name: Install Python
406+
uses: actions/setup-python@v2
407+
with:
408+
python-version: ${{ matrix.python }}
409+
architecture: 'x64'
410+
- name: Setup Node
411+
uses: actions/setup-node@v2
412+
with:
413+
node-version: ${{matrix.nodejs}}
414+
- uses: actions/download-artifact@v2
415+
with:
416+
name: jupyterlab-lsp dist ${{ github.run_number }}
417+
path: ./dist
418+
- name: Install the prerequisites
419+
run: python -m pip install pip wheel
420+
- name: Install JupyterLab
421+
shell: bash -l {0}
422+
run: python -m pip install 'jupyterlab${{ matrix.lab }}'
423+
- name: Install the server package
424+
run: cd dist && python -m pip install -vv jupyter_lsp*.whl
425+
- name: install the source extension
426+
run: cd dist && jupyter labextension install krassowski-jupyterlab-lsp-*.tgz --log-level DEBUG
427+
- name: Validate the install
428+
run: |
429+
set -eux
430+
jupyter labextension list
431+
jupyter server extension list
432+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
433+
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## CHANGELOG
22

3+
### `@krassowski/jupyterlab-lsp 3.4.1` (2020-02-16)
4+
5+
- bug fixes:
6+
7+
- fixed installation of the source version of the extension (causing build error if classic was not installed) ([#526])
8+
9+
[#526]: https://github.com/krassowski/jupyterlab-lsp/pull/526
10+
311
### `@krassowski/jupyterlab-lsp 3.4.0` (2020-02-14)
412

513
- features:
@@ -13,6 +21,7 @@
1321
- long file paths are now collapsed if composed of more than two segments to avoid status popover and diagnostics panel getting too wide ([#524])
1422

1523
- bug fixes:
24+
1625
- user-invoked completion in strings works again ([#521])
1726
- completer documentation will now consistently show up after filtering the completion items ([#520])
1827
- completions containing HTML-like syntax will be displayed properly (an upstream issue) ([#520], [#523])

packages/jupyterlab-lsp/src/adapter_manager.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { IDocumentWidget } from '@jupyterlab/docregistry';
99
import { WidgetAdapter } from './adapters/adapter';
1010
import { ILabShell, JupyterFrontEndPlugin } from '@jupyterlab/application';
1111
import { LSPExtension } from './index';
12-
import { IClassicShell } from '@jupyterlab-classic/application';
12+
import type { IClassicShell } from '@jupyterlab-classic/application';
1313

1414
export class WidgetAdapterManager implements ILSPAdapterManager {
1515
adapterTypeAdded: Signal<
@@ -143,23 +143,8 @@ export class WidgetAdapterManager implements ILSPAdapterManager {
143143

144144
export const WIDGET_ADAPTER_MANAGER: JupyterFrontEndPlugin<ILSPAdapterManager> = {
145145
id: PLUGIN_ID + ':ILSPAdapterManager',
146-
optional: [ILabShell, IClassicShell],
147-
activate: (
148-
app,
149-
labShell: ILabShell | null,
150-
classicShell: IClassicShell | null
151-
) => {
152-
let shell: ILabShell | IClassicShell;
153-
if (labShell === null && classicShell === null) {
154-
console.log(
155-
'Neither ILabShell not or IClassicShell was resolved, using app.shell'
156-
);
157-
shell = app.shell as IClassicShell;
158-
} else if (labShell === null) {
159-
shell = classicShell;
160-
} else {
161-
shell = labShell;
162-
}
146+
activate: app => {
147+
let shell = app.shell as ILabShell | IClassicShell;
163148
return new WidgetAdapterManager(shell);
164149
},
165150
provides: ILSPAdapterManager,

0 commit comments

Comments
 (0)