Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix source install #526

Merged
merged 9 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,45 @@ jobs:
jupyter server extension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -

source:
name: smoke source install ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
needs: [build]
strategy:
fail-fast: false
matrix:
os: [ubuntu]
python: ['3.6']
nodejs: ['14']
lab: ['>=3.0.0,<4.0.0a0']
steps:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.nodejs}}
- uses: actions/download-artifact@v2
with:
name: jupyterlab-lsp dist ${{ github.run_number }}
path: ./dist
- name: Install the prerequisites
run: python -m pip install pip wheel
- name: Install JupyterLab
shell: bash -l {0}
run: python -m pip install 'jupyterlab${{ matrix.lab }}'
- name: Install the server package
run: cd dist && python -m pip install -vv jupyter_lsp*.whl
- name: install the source extension
run: cd dist && jupyter labextension install krassowski-jupyterlab-lsp-*.tgz --log-level DEBUG
- name: Validate the install
run: |
set -eux
jupyter labextension list
jupyter server extension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## CHANGELOG

### `@krassowski/jupyterlab-lsp 3.4.1` (2020-02-16)

- bug fixes:

- fixed installation of the source version of the extension (causing build error if classic was not installed) ([#526])

[#526]: https://github.com/krassowski/jupyterlab-lsp/pull/526

### `@krassowski/jupyterlab-lsp 3.4.0` (2020-02-14)

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

- bug fixes:

- user-invoked completion in strings works again ([#521])
- completer documentation will now consistently show up after filtering the completion items ([#520])
- completions containing HTML-like syntax will be displayed properly (an upstream issue) ([#520], [#523])
Expand Down
21 changes: 3 additions & 18 deletions packages/jupyterlab-lsp/src/adapter_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IDocumentWidget } from '@jupyterlab/docregistry';
import { WidgetAdapter } from './adapters/adapter';
import { ILabShell, JupyterFrontEndPlugin } from '@jupyterlab/application';
import { LSPExtension } from './index';
import { IClassicShell } from '@jupyterlab-classic/application';
import type { IClassicShell } from '@jupyterlab-classic/application';

export class WidgetAdapterManager implements ILSPAdapterManager {
adapterTypeAdded: Signal<
Expand Down Expand Up @@ -143,23 +143,8 @@ export class WidgetAdapterManager implements ILSPAdapterManager {

export const WIDGET_ADAPTER_MANAGER: JupyterFrontEndPlugin<ILSPAdapterManager> = {
id: PLUGIN_ID + ':ILSPAdapterManager',
optional: [ILabShell, IClassicShell],
activate: (
app,
labShell: ILabShell | null,
classicShell: IClassicShell | null
) => {
let shell: ILabShell | IClassicShell;
if (labShell === null && classicShell === null) {
console.log(
'Neither ILabShell not or IClassicShell was resolved, using app.shell'
);
shell = app.shell as IClassicShell;
} else if (labShell === null) {
shell = classicShell;
} else {
shell = labShell;
}
activate: app => {
let shell = app.shell as ILabShell | IClassicShell;
return new WidgetAdapterManager(shell);
},
provides: ILSPAdapterManager,
Expand Down