-
Notifications
You must be signed in to change notification settings - Fork 32
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
testing dependencies in 3.8 #276
Comments
I see the pain. However, UnitTesting installs required (extra-)packages and their dependencies via Package Control and thus has no idea of old depencendy format vs. new libraries, nor their storage location. It also treat alls folders in Packages directory as normal packages. As a result specified LSP-pyright extra-package causes latest release of lsp_utils library being installed to lib/python38 already. Hence it is not possible to "just link" any folder from a checked out repo to lib/python38 even if it would be within scope of UnitTesting to setup dependencies. The most obvious solution would probably be test code importing required modules via relative import The only other possible solution might be to somehow register the tested repo as repository for Package Control, so it would install that rather than latest release. |
The hacky solution that comes to mind (which I could probably do in the workflow myself) is to let PC do its thing and then overwrite the dependency in |
After setup action ST, PC, packages and dependencies are all in place. The test package What's left to do is to replace Data/lib/python38/lsp_utils with that from Data/Packages/lsp_utils/st3/. With some luck, packages path is exported as |
I did implement the hack in sublimelsp/lsp_utils#126. Doing it in a generic way that considers all possible cases would take some more work. |
I've been using this action to test
lsp_utils
dependency in:https://github.com/sublimelsp/lsp_utils/blob/f2a43fa2db4aeddbcf8ea1ce79ce95f143ddc696/.github/workflows/on-pull-request.yml#L18-L38
With PC 4 now it's no longer enough to link dependency in
Packages/*
. Now it needs to be linked in../Lib/python38/*
. And not the root directory of the dependency itself has to be linked but rather thedependency_name/st3/dependency_name/
instead.And the tests I guess still have to be copied/linked to
Packages/*
with according.python-version
added.I suppose it's a bit of a tricky case to handle now but this is the issue asking for adding support for that. :)
The text was updated successfully, but these errors were encountered: