Skip to content

Commit 15726b5

Browse files
committed
Merge branch 'master' into kiteco-completion-items
2 parents b6fff6c + cefda11 commit 15726b5

File tree

11 files changed

+102
-35
lines changed

11 files changed

+102
-35
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
## CHANGELOG
22

3-
### `@krassowski/jupyterlab-lsp 1.1.1` (unreleased)
3+
### `@krassowski/jupyterlab-lsp 1.1.2` (2020-08-05)
44

55
- bug fixes
66

77
- emits console warnings instead of throwing errors in hover handlers and connections ([#299][], [#300][])
8+
- improve URL checks in message handling to enable LaTeX diagnostics to work when configured ([#288][])
89

910
[#299]: https://github.com/krassowski/jupyterlab-lsp/pull/299
1011
[#300]: https://github.com/krassowski/jupyterlab-lsp/pull/300
1112

12-
### `jupyter-lsp 0.9.x` (unreleased)
13+
### `jupyter-lsp 0.9.1` (2020-08-05)
1314

1415
- autodetects the `texlab` language server for `.tex` files ([#288][])
1516
- diagnostics _should_ be provided by `chktex` on save, but don't yet appear,

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,19 @@ python scripts/combine.py
279279
and change `create_console('browser')` to `create_console('floating')` in `VirtualEditor`
280280
constructor (please feel free to add a config option for this).
281281

282+
- If you see:
283+
284+
> `SessionNotCreatedException: Message: Unable to find a matching set of capabilities`
285+
286+
`geckodriver >=0.27.0` requires an _actual_ Firefox executable. Several places
287+
will be checked (including where `conda-forge` installs, as in CI): to test
288+
a Firefox _not_ on your `PATH`, set the following enviroment variable:
289+
290+
```bash
291+
export FIREFOX_BINARY=/path/to/firefox # ... unix
292+
set FIREFOX_BINARY=C:\path\to\firefox.exe # ... windows
293+
```
294+
282295
### Formatting
283296

284297
Minimal code style is enforced with `pytest-flake8` during unit testing. If installed,

LANGUAGESERVERS.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

atest/Keywords.robot

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,22 @@ Wait For Splash
8484

8585
Open JupyterLab
8686
Set Environment Variable MOZ_HEADLESS ${HEADLESS}
87-
${firefox} = Which firefox
87+
${firefox} = Get Firefox Binary
8888
${geckodriver} = Which geckodriver
89-
Create WebDriver Firefox executable_path=${geckodriver} firefox_binary=${firefox} service_log_path=${OUTPUT DIR}${/}geckodriver.log
89+
${service args} = Create List --log debug
90+
Create WebDriver Firefox
91+
... executable_path=${geckodriver}
92+
... firefox_binary=${firefox}
93+
... service_log_path=${OUTPUT DIR}${/}geckodriver.log
94+
... service_args=${service args}
9095
Wait Until Keyword Succeeds 3x 5s Wait For Splash
9196

97+
Get Firefox Binary
98+
[Documentation] Get Firefox path from the environment... or hope for the best
99+
${from which} = Which firefox
100+
${firefox} = Set Variable If "%{FIREFOX_BINARY}" %{FIREFOX_BINARY} ${from which}
101+
[Return] ${firefox}
102+
92103
Close JupyterLab
93104
Close All Browsers
94105

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ variables:
1313
ATEST_RETRIES: 3
1414
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
1515

16-
PY_JLSP_VERSION: 0.9.0
17-
JS_JLLSP_VERSION: 1.1.0
16+
PY_JLSP_VERSION: 0.9.1
17+
JS_JLLSP_VERSION: 1.1.2
1818
JS_JLG2D_VERSION: 1.0.0
1919

2020
FIRST_PARTY_LABEXTENSIONS: >-

packages/jupyterlab-lsp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@krassowski/jupyterlab-lsp",
3-
"version": "1.1.0",
3+
"version": "1.1.2",
44
"description": "Language Server Protocol integration for JupyterLab",
55
"keywords": [
66
"jupyter",

packages/metapackage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@krassowski/jupyterlab-lsp-metapackage",
3-
"version": "1.1.0",
3+
"version": "1.1.2",
44
"description": "JupyterLab LSP - Meta Package. All of the packages used by JupyterLab LSP",
55
"homepage": "https://github.com/krassowski/jupyterlab-lsp",
66
"bugs": {

py_src/jupyter_lsp/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
""" single source of truth for jupyter_lsp version
22
"""
3-
__version__ = "0.9.0"
3+
__version__ = "0.9.1"

py_src/jupyter_lsp/tests/test_paths.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def test_normalize_posix_path_home_subdir(
3232
assert normalized_uri(root_dir) == expected_root_uri
3333

3434

35-
@pytest.mark.skipif(~WIN, reason="can't test Windows paths on POSIX")
35+
@pytest.mark.skipif(not WIN, reason="can't test Windows paths on POSIX")
3636
@pytest.mark.parametrize(
3737
"root_dir, expected_root_uri",
3838
[
3939
["c:\\Users\\user1", "file:///c:/Users/user1"],
4040
["C:\\Users\\user1", "file:///c:/Users/user1"],
41-
["//VBOXSVR/shared-folder", "file://vboxsvr/shared-folder"],
41+
["//VBOXSVR/shared-folder", "file://vboxsvr/shared-folder/"],
4242
],
4343
)
4444
def test_normalize_windows_path_case(root_dir, expected_root_uri): # pragma: no cover
@@ -58,12 +58,13 @@ def test_file_uri_to_path_posix(file_uri, expected_posix_path): # pragma: no co
5858
assert file_uri_to_path(file_uri) == expected_posix_path
5959

6060

61-
@pytest.mark.skipif(~WIN, reason="can't test Windows paths on POSIX")
61+
@pytest.mark.skipif(not WIN, reason="can't test Windows paths on POSIX")
6262
@pytest.mark.parametrize(
6363
"file_uri, expected_windows_path",
6464
[
65-
["file:///C:/Windows/System32/Drivers/etc", r"C:\Windows\System32\Drivers\etc"],
66-
["file:///C:/some%20dir/some%20file.txt", r"C:\some dir\some file.txt"],
65+
# https://github.com/krassowski/jupyterlab-lsp/pull/305#issuecomment-665996145
66+
["file:///C:/Windows/System32/Drivers/etc", "C:/Windows/System32/Drivers/etc"],
67+
["file:///C:/some%20dir/some%20file.txt", "C:/some dir/some file.txt"],
6768
],
6869
)
6970
def test_file_uri_to_path_windows(file_uri, expected_windows_path): # pragma: no cover

scripts/atest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import shutil
77
import sys
88
import time
9+
from os.path import join
910
from pathlib import Path
1011

1112
import robot
@@ -45,6 +46,24 @@ def get_stem(attempt, extra_args):
4546
def atest(attempt, extra_args):
4647
""" perform a single attempt of the acceptance tests
4748
"""
49+
50+
if "FIREFOX_BINARY" not in os.environ:
51+
os.environ["FIREFOX_BINARY"] = shutil.which("firefox")
52+
53+
prefix = os.environ.get("CONDA_PREFIX")
54+
55+
if prefix:
56+
app_dir = join(prefix, "bin", "FirefoxApp")
57+
os.environ["FIREFOX_BINARY"] = {
58+
"Windows": join(prefix, "Library", "bin", "firefox.exe"),
59+
"Linux": join(app_dir, "firefox"),
60+
"Darwin": join(app_dir, "Contents", "MacOS", "firefox"),
61+
}[OS]
62+
63+
print("Will use firefox at", os.environ["FIREFOX_BINARY"])
64+
65+
assert os.path.exists(os.environ["FIREFOX_BINARY"])
66+
4867
extra_args += OS_PY_ARGS.get((OS, PY), [])
4968

5069
stem = get_stem(attempt, extra_args)

0 commit comments

Comments
 (0)