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

Add structure hook for Union[str, List[InlayHintLabelPart]] #219

Merged
merged 2 commits into from
Jun 21, 2023

Conversation

alcarney
Copy link
Contributor

Fixes #218

karthiknadig
karthiknadig previously approved these changes Jun 19, 2023
@karthiknadig karthiknadig self-assigned this Jun 19, 2023
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Jun 19, 2023
@karthiknadig
Copy link
Member

@alcarney It looks like how pygls used to run tests has changed. Would it be possible for you to update the github workflow so that we can run pygls tests as smoke tests?

@alcarney
Copy link
Contributor Author

It is not immediately obvious to me why the test suite would hang before running any tests - especially when they seem to run fine over on the pygls repo....

But I will have a look and see if I can reproduce it locally

@karthiknadig
Copy link
Member

@alcarney I was running pytest directly, but it looks like we should probably use tox to run pygls tests.

@alcarney
Copy link
Contributor Author

@karthiknadig I reproduced it locally - test suite hangs on the second test.
I seem to remember having issues with that test when I wrote it originally - hopefully I can remember what the issue was!

================================================= test session starts =================================================
platform linux -- Python 3.11.3, pytest-7.3.2, pluggy-1.0.0
rootdir: /var/home/alex/Projects/lsprotocol/smoke_tests
configfile: pyproject.toml
plugins: typeguard-4.0.0, asyncio-0.21.0
asyncio: mode=Mode.AUTO
collected 213 items                                                                                                   

smoke_tests/tests/test_client.py::test_client_detect_server_exit 
--------------------------------------------------- live log setup ----------------------------------------------------
DEBUG    asyncio:selector_events.py:54 Using selector: EpollSelector
DEBUG    asyncio:selector_events.py:54 Using selector: EpollSelector
---------------------------------------------------- live log call ----------------------------------------------------
DEBUG    pygls.client:client.py:110 Starting server process: /var/home/alex/Projects/lsprotocol/.ci/bin/python -c print('Hello, World!')
DEBUG    pygls.client:client.py:134 Server process 105533 exited with return code: 0
PASSED                                                                                                          [  0%]
-------------------------------------------------- live log teardown --------------------------------------------------
DEBUG    asyncio:selector_events.py:54 Using selector: EpollSelector

smoke_tests/tests/test_client.py::test_client_detect_invalid_json 
--------------------------------------------------- live log setup ----------------------------------------------------
DEBUG    asyncio:selector_events.py:54 Using selector: EpollSelector
---------------------------------------------------- live log call ----------------------------------------------------
DEBUG    pygls.client:client.py:110 Starting server process: /var/home/alex/Projects/lsprotocol/.ci/bin/python /var/home/alex/Projects/lsprotocol/smoke_tests/tests/servers/invalid_json.py
DEBUG    pygls.protocol:protocol.py:583 Sending request with id "e7f074c7-fca1-485e-881a-9b94dde57a17": method/name {}
INFO     pygls.protocol:protocol.py:462 Sending data: {"id": "e7f074c7-fca1-485e-881a-9b94dde57a17", "method": "method/name", "jsonrpc": "2.0", "params": {}}
DEBUG    pygls.client:client.py:134 Server process 105539 exited with return code: 1

alcarney added 2 commits June 19, 2023 22:49
With the addition of tests for pygls' new base JSON-RPC client, it's
necessary for `pygls` itself to be importable in order to spin up the
test servers.
@karthiknadig karthiknadig enabled auto-merge (squash) June 19, 2023 22:19
@karthiknadig karthiknadig merged commit 5c4edc5 into microsoft:main Jun 21, 2023
@alcarney alcarney deleted the inlay-hint-hooks branch June 21, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing structure hook for InlayHint
3 participants