Skip to content

Commit 4c9bce5

Browse files
committed
Add test for the completion of the biggest namespace in R
1 parent bd8f5f8 commit 4c9bce5

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

2323
- send periodic pings on websocket channels to maintain connection ([#459], thanks @franckchen)
2424
- R languageserver is no longer incorrectly shown as available when not installed ([#463])
25+
- fix completion of very large namespaces (e.g. in R's base or in JavaScript) due to truncated message relay ([#477])
2526

2627
[#459]: https://github.com/krassowski/jupyterlab-lsp/pull/459
2728
[#463]: https://github.com/krassowski/jupyterlab-lsp/pull/463
29+
[#477]: https://github.com/krassowski/jupyterlab-lsp/pull/477
2830

2931
### `@krassowski/jupyterlab-lsp 3.0.0` (2021-01-06)
3032

atest/05_Features/Completion.robot

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ Completes Correctly With R Double And Triple Colon
203203
Wait Until Keyword Succeeds 40x 0.5s File Editor Line Should Equal 3 datasets:::.packageName
204204
[Teardown] Clean Up After Working With File completion.R
205205

206+
Completes Large Namespaces
207+
[Setup] Prepare File for Editing R completion completion.R
208+
Place Cursor In File Editor At 6 7
209+
Wait Until Fully Initialized
210+
Trigger Completer
211+
Completer Should Suggest abs timeout=30s
212+
[Teardown] Clean Up After Working With File completion.R
213+
206214
*** Keywords ***
207215
Setup Completion Test
208216
Setup Notebook Python Completion.ipynb
@@ -235,8 +243,8 @@ Select Completer Suggestion
235243
Click Element ${suggestion} code
236244

237245
Completer Should Suggest
238-
[Arguments] ${text}
239-
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-item[data-value="${text}"] timeout=10s
246+
[Arguments] ${text} ${timeout}=10s
247+
Wait Until Page Contains Element ${COMPLETER_BOX} .jp-Completer-item[data-value="${text}"] timeout=${timeout}
240248
Capture Page Screenshot ${text.replace(' ', '_')}.png
241249

242250
Completer Should Include Icon

atest/examples/completion.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
tools::
33
# `datasets:::<tab>` → select `.packageName` → `datasets:::.packageName`
44
datasets:::
5+
# `base:::<tab>` → works
6+
base:::

docs/Configuring.ipynb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
},
211211
{
212212
"cell_type": "markdown",
213+
"metadata": {
214+
"collapsed": false
215+
},
213216
"source": [
214217
"### Example: Scala Language Server (metals) integration with jupyterlab-lsp\n",
215218
"\n",
@@ -225,11 +228,13 @@
225228
"$ ./coursier launch --fork almond -- --install\n",
226229
"$ rm -f coursier\n",
227230
"```\n",
231+
"\n",
228232
"Spark Magic kernel:\n",
229233
"\n",
230234
"```bash\n",
231235
"pip install sparkmagic\n",
232236
"```\n",
237+
"\n",
233238
"Now, install the spark kernel:\n",
234239
"\n",
235240
"```bash\n",
@@ -247,7 +252,8 @@
247252
"\n",
248253
"(Might need to use the --force-fetch flag if you are getting dependency issues.)\n",
249254
"\n",
250-
"Step 3: Configure the metals server in jupyterlab-lsp. Enter the following in the jupyter_server_config.json:\n",
255+
"Step 3: Configure the metals server in jupyterlab-lsp. Enter the following in\n",
256+
"the jupyter_server_config.json:\n",
251257
"\n",
252258
"```python\n",
253259
"{\n",
@@ -264,11 +270,10 @@
264270
"}\n",
265271
"```\n",
266272
"\n",
267-
"You are good to go now! Just start `jupyter lab` and create a notebook with either the Spark or the Scala kernel and you should be able to see the metals server initialised from the bottom left corner."
268-
],
269-
"metadata": {
270-
"collapsed": false
271-
}
273+
"You are good to go now! Just start `jupyter lab` and create a notebook with\n",
274+
"either the Spark or the Scala kernel and you should be able to see the metals\n",
275+
"server initialised from the bottom left corner."
276+
]
272277
}
273278
],
274279
"metadata": {

0 commit comments

Comments
 (0)