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

completion improvements #51

Merged
merged 8 commits into from
Dec 21, 2023
Merged

completion improvements #51

merged 8 commits into from
Dec 21, 2023

Conversation

mgor
Copy link
Collaborator

@mgor mgor commented Dec 20, 2023

fixed problem in Biometria-se/grizzly#296.

implemented better support for And and But, since they depend on a non-"one of those" steps arbritary number of lines above. now when completing with those, it will only return suggestions related to the identified "base" keyword above it, instead of all.

client/vscode completion tests has been greatly approved by actually accepting a suggestion and verifying that the completef line turned out as expected. that is a hack though, since there are no events to listen for that would tell you that the UI is done, so sleeps are introduced :(

ms-python.python and it's @vscode/python-extension API is buggy when it comes to selecting python environment, seems like it does not take which python environment that is active when executing into consideration at all.

workaround this in the extension by looking if VIRTUAL_ENV environment variable is set, and use the value of that to resolve the environment used.

in the workflow action/setup-python will set environment variable pythonLocation for the environment that is configured. so when running the client test we set VIRTUAL_ENV to the value of pythonLocation.

optional monkey patching, to handle it being installed in projects that does not have `gevent` as an requirement.

fixes Biometria-se/grizzly#299.
@mgor mgor requested a review from boffman December 20, 2023 13:05
fixed problem in Biometria-se/grizzly#296.

implemented better support for `And` and `But`, since they depend on a non-"one of those" steps arbritary number of lines above. now when completing with those, it will only return suggestions related to the identified "base" keyword above it, instead of all.

client/vscode completion tests has been greatly approved by actually accepting a suggestion and verifying that the complete line turned out as expected. that is a hack though, since there are no events to listen for that would tell you that the UI is done, so sleeps are introduced :(
one of the sleeps could be removed by adding a onDidTextDocumentChange listener, but it should be removed after each time it has executed, and then it becomes a chicken-and-egg problem...
and other packages that had newer versions.
vscode 1.85.1 had some changes which broke the test package.
removed debug logging.

ms-python.python extension, which provide the @vscode/python-extension API had problems selecting the correct python environment, causing the tests to fail since the language server couldn't be started. the language server module was installed in the environment action/setup-python had configured.
in the runner a version of 3.8 through 3.12 was installed, and for some reason the extension (on windows and mac) decided that the active environment was the highest version...
@mgor mgor merged commit 3ba0c76 into Biometria-se:main Dec 21, 2023
12 checks passed
@mgor mgor deleted the bug/issue_296 branch December 21, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants