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

Use app's HTTP settings, handle feature settings race condition, CI/build updates, lazy server discovery #882

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a957e61
defer initialization until event loop is available
bollwyvl Sep 12, 2022
26c9ee4
[880] ws
bollwyvl Dec 10, 2022
6309405
[880] dependencies and resolutions
bollwyvl Dec 10, 2022
eb71ed1
[880] builder
bollwyvl Dec 10, 2022
5b431a0
[880] reuse app http settings
bollwyvl Dec 10, 2022
98c1d36
[880] roll back prettier change
bollwyvl Dec 10, 2022
3fe641e
[880] deduplicate
bollwyvl Dec 10, 2022
a28ee70
[880] feature settings promisedelegate
bollwyvl Dec 10, 2022
4e476a8
[880] eslint settings
bollwyvl Dec 10, 2022
f65b5e9
[880] linting
bollwyvl Dec 10, 2022
16876bd
Merge remote-tracking branch 'upsteam/master' into gh-880-mk2-use-ser…
bollwyvl Dec 11, 2022
58d9561
linting
bollwyvl Dec 11, 2022
eca335d
linting, removing prettier churn
bollwyvl Dec 11, 2022
87bd259
update changelog
bollwyvl Dec 11, 2022
a466620
bump lsp-ws-connection
bollwyvl Dec 11, 2022
15da0a2
bump to actions/cache@v3
bollwyvl Dec 11, 2022
7603b46
bump ws dep back down for smoke
bollwyvl Dec 11, 2022
66140a6
normalize @jupyterlab/* version
bollwyvl Dec 11, 2022
f989a83
bump more action versions
bollwyvl Dec 11, 2022
ac35714
remove sharedPackages for source build
bollwyvl Dec 11, 2022
a4fb737
clean up some use of setup-miniconda
bollwyvl Dec 11, 2022
2608ab6
squash some audit warnings
bollwyvl Dec 11, 2022
b4f02a8
lawyer up, more naming
bollwyvl Dec 11, 2022
87c1fb4
more lawyering
bollwyvl Dec 11, 2022
bd233fc
remove use of deprecated entrypoints
bollwyvl Dec 11, 2022
25d158b
Merge branch 'gh-851-lazy-initialization' into gh-880-mk2-use-server-…
bollwyvl Dec 11, 2022
58ff3e1
bump jupyter-lsp version
bollwyvl Dec 11, 2022
bf6e421
server extension enable in postBuild
bollwyvl Dec 11, 2022
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
14 changes: 0 additions & 14 deletions .github/.condarc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
58 changes: 22 additions & 36 deletions .github/workflows/job.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ jobs:
lab: '${{ matrix.lab }}'
nodejs: '${{ matrix.nodejs }}'

- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-${{ hashFiles('requirements/github-actions.yml', 'requirements/lint.yml') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-

- name: Set up Python and mamba
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -82,7 +73,7 @@ jobs:

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: |
Expand All @@ -91,7 +82,7 @@ jobs:
- name: Cache yarn packages
id: cache-yarn-packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .yarn-packages
key: |
Expand Down Expand Up @@ -122,6 +113,10 @@ jobs:
- name: Check distributions
run: python scripts/distcheck.py

- name: Rename uncached conda packages
shell: bash
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"

build:
name: build
runs-on: ${{ matrix.os }}-latest
Expand All @@ -132,7 +127,7 @@ jobs:
lab: ['>=3.1.0,<4.0.0a0']
r: ['>=4']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: cschleiden/replace-tokens@v1
with:
Expand All @@ -143,26 +138,18 @@ jobs:
lab: '${{ matrix.lab }}'
nodejs: '${{ matrix.nodejs }}'

- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-${{ hashFiles('requirements/github-actions.yml') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-

- name: Set up Python and mamba
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
use-mamba: true

- name: Install minimal build deps
run: mamba install -n test -c conda-forge setuptools wheel 'jupyterlab${{ matrix.lab }}' 'nodejs${{ matrix.nodejs }}'

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: |
Expand All @@ -171,7 +158,7 @@ jobs:
- name: Cache yarn packages
id: cache-yarn-packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .yarn-packages
key: |
Expand Down Expand Up @@ -214,6 +201,10 @@ jobs:
name: jupyterlab-lsp dist ${{ github.run_number }}
path: ./dist

- name: Rename uncached conda packages
shell: bash
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"

acceptance:
runs-on: ${{ matrix.os }}-latest
name: atest ${{ matrix.os }} py${{ matrix.python }} r${{ matrix.r }}
Expand Down Expand Up @@ -250,15 +241,6 @@ jobs:
lab: '${{ matrix.lab }}'
nodejs: '${{ matrix.nodejs }}'

- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-${{ hashFiles('requirements/github-actions.yml') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-

- name: Set up Python and mamba
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -272,7 +254,7 @@ jobs:

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: |
Expand All @@ -281,7 +263,7 @@ jobs:
- name: Cache yarn packages
id: cache-yarn-packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .yarn-packages
key: |
Expand All @@ -290,7 +272,7 @@ jobs:
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
${{ env.CACHE_EPOCH }}-yarn-

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.julia/artifacts
key: |
Expand Down Expand Up @@ -351,12 +333,16 @@ jobs:
shell: bash

- name: Publish browser test output
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ job.status }} Robot ${{ matrix.os }} Python ${{ matrix.python }} ${{ github.run_number }}
path: ./atest/output
if: always()

- name: Rename uncached conda packages
shell: bash
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"

smoke:
name: smoke ${{ matrix.os }} py${{ matrix.python }}
runs-on: ${{ matrix.os }}-latest
Expand Down
29 changes: 26 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,45 @@
- implement jump target selector and jump to references ([#739])
- implement settings UI using native JupyterLab 3.3 UI ([#778])
- add option to show hover tooltip automatically ([#864], thanks @yamaton)
- bug fixes
- bug fixes:
- use correct websocket URL if configured as different from base URL ([#820], thanks @MikeSem)
- clean up all completer styles when completer feature is disabled ([#829]).
- fix `undefined` being inserted for path-like completion items with no `insertText` ([#833])
- reduce signature flickering when typing and hover flicker when moving mouse ([#836])
- fix sporadic misplacement of hover tooltips ([#860], thanks @yamaton)
- handle potential race condition in feature settings loading ([#882])
- refactoring:
- changed NPM packages namespace from `@krassowski` to `@jupyter-lsp` ([#862])
- move client capabilities to features ([#738])
- downstreams:
- use the host application's HTTP settings for requests to the REST and WebSocket routes ([#881])
- source maps are provided for improved debugging ([#882])
- the derived JSON Schema types are avilable as `SCHEMA` ([#882])
- documentation:
- add missing `--channel` to conda instruction for texlab ([#789], thanks @justin-f-perez)
- remove references to pylsp fork ([#800] and [#814], thanks @joelostblom and @nickfong)
- add Robot Framework language server ([#724], thanks @bollwyvl)
- add a list of third-party and community language servers ([#826], thanks @cccs-jc)
- fix documentation of .lsp_symlink workaround ([#828])
- fix documentation of `.lsp_symlink` workaround ([#828])
- maintenance:
- bump minimum required JupyterLab version to 3.3 (`>=3.3.0,<4.0.0a0`)
- bump minimum required Node.js version to 14.0 (12.0 reached EOL in April)
- use newer `@jupyterlab/builder` which provides third-party license information ([#882])

### `lsp-ws-connection 0.7.1` (not-yet-released)

- downstreams:
- includes sourcemaps for easier debugging ([#882])
- maintenance:
- handle notifcation promises more explicitly ([#882])

### `jupyter-lsp 1.6.0` (not-yet-released)

- dependencies:
- uses `importlib_metadata` (or `importlib.metadata` on 3.10+) for `entry_points` ([#882])
- performance:
- `entry_point` discovery is deferred until server has started, improving
`jupyter_server` startup time ([#852])

[#724]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/724
[#738]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/738
Expand All @@ -36,8 +57,10 @@
[#829]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/829
[#833]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/833
[#836]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/836
[#852]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/852
[#860]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/860
[#864]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/864
[#882]: https://github.com/jupyter-lsp/jupyterlab-lsp/pull/882

### `@krassowski/jupyterlab-lsp 3.10.1` (2022-03-21)

Expand Down Expand Up @@ -626,7 +649,7 @@

- bug fixes

- bump version of lsp-ws-connection dependency to fix the LaTeX server issues (see [#337])
- bump version of `lsp-ws-connection` dependency to fix the LaTeX server issues (see [#337])

[#337]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/337

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2019, jupyter-lsp contributors
Copyright (c) 2022, jupyter-lsp contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion atest/05_Features/Completion.robot
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Activate Completer Suggestion
Capture Page Screenshot ${i}-completions.png
${matching_active_elements} = Get Element Count ${active_suggestion}
LOG ${matching_active_elements}
IF ${matching_active_elements} == 1 BREAK
IF ${matching_active_elements} == 1 BREAK
Press Keys None DOWN
Sleep 0.1s
END
Expand Down
2 changes: 1 addition & 1 deletion binder/overrides.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@krassowski/jupyterlab-lsp:plugin": {
"@jupyter-lsp/jupyterlab-lsp:plugin": {
"language_servers": {
"robotframework_ls": {
"serverSettings": {
Expand Down
1 change: 1 addition & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pushd python_packages/jupyter_lsp
python setup.py sdist bdist_wheel
python -m pip install -e . --ignore-installed --no-deps -vv
jupyter serverextension enable --sys-prefix --py jupyter_lsp
jupyter server extension enable --sys-prefix --py jupyter_lsp
popd

# Install the labextension
Expand Down
2 changes: 1 addition & 1 deletion docs/Language Servers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
"| Scala | [scalameta/metals] | (2) |\n",
"\n",
"[jupyrdf/graph-lsp]: https://github.com/jupyrdf/graph-lsp\n",
"[CybercentreCanada/jupyterlab-sql-editor]:\n",
"[cybercentrecanada/jupyterlab-sql-editor]:\n",
" https://github.com/CybercentreCanada/jupyterlab-sql-editor\n",
"[jupyter-lsp/json-lsp]: https://github.com/jupyter-lsp/json-lsp\n",
"[jupyter-lsp/yaml-lsp]: https://github.com/jupyter-lsp/yaml-lsp\n",
Expand Down
39 changes: 23 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
{
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"@typescript-eslint/parser": "^5.46.0",
"bash-language-server": "^3.0.0",
"dictionary-en": "^3.0.0",
"dockerfile-language-server-nodejs": "^0.7.1",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint": "^8.29.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.6",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"husky": "^3.0.9",
"jest-github-actions-reporter": "^1.0.2",
"lerna": "^5.1.0",
"jest-github-actions-reporter": "^1.0.3",
"lerna": "^6.0.0",
"npm-run-all": "^4.1.5",
"precise-commits": "^1.0.2",
"prettier": "^2.1.2",
"prettier": "^2.8.1",
"pyright": "^1.1",
"sql-language-server": "^1.1.0",
"typescript": "~4.1.3",
"source-map-loader": "^4.0.1",
"sql-language-server": "^1.2.1",
"typescript": "~4.9.4",
"typescript-language-server": "^0.6.4",
"unified-language-server": "^0.3.0",
"vscode-css-languageserver-bin": "^1.4.0",
"vscode-html-languageserver-bin": "^1.4.0",
"vscode-json-languageserver-bin": "^1.0.1",
"vscode-json-languageservice": "^4.1.8",
"yaml-language-server": "^1.0.0"
"yaml-language-server": "^1.0.0",
"yarn-deduplicate": "^6.0.0"
},
"husky": {
"hooks": {}
Expand All @@ -39,10 +41,15 @@
},
"private": true,
"resolutions": {
"**/node-gyp": "8.4.1"
"**/node-gyp": "8.4.1",
"prettier": "^2.8.1",
"typescript": "~4.9.4",
"verdaccio": "file:scripts/_not-a-package",
"decode-uri-component": "^0.2.1"
},
"scripts": {
"bootstrap": "jlpm --no-optional --prefer-offline && lerna bootstrap && jlpm clean && jlpm build && jlpm lint",
"bootstrap": "jlpm --no-optional --prefer-offline && jlpm deduplicate && lerna bootstrap && jlpm clean && jlpm build && jlpm lint",
"deduplicate": "yarn-deduplicate -s fewer --fail",
"build": "jlpm build:schema && jlpm build:meta && jlpm build:ws && jlpm build:labextension",
"build:schema": "lerna run build:schema --stream",
"build:meta": "lerna run build --stream --scope @jupyter-lsp/jupyterlab-lsp-metapackage",
Expand Down
2 changes: 0 additions & 2 deletions packages/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:react/recommended',
'plugin:jest/recommended'
],
Expand Down Expand Up @@ -50,7 +49,6 @@ module.exports = {
'jest/expect-expect': 'off',
'jest/no-export': 'warn',
'jest/no-jest-import': 'off',
'jest/no-try-expect': 'warn',
'no-case-declarations': 'warn',
'no-control-regex': 'warn',
'no-inner-declarations': 'off',
Expand Down
Loading