-
Notifications
You must be signed in to change notification settings - Fork 28
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
Monorepo: allow a way to configure cwd
based on pyproject.toml
or ini
file location
#259
Comments
For a setup like this:
We recommend using
This will run About https://code.visualstudio.com/docs/editor/variables-reference , if you see the details those are only supported in |
This is largely the setup I tried, but it doesn't work properly with interpreter selection (and has a number of other issues, see microsoft/vscode-python#21204 (comment)). I think this issue is probably infeasible, feel free to close, but the situation with python monorepos remains not great. |
One thing we can do that is typically done by tools themselves is a way to search parents until I will tur this into a feature request. If this gets solved with generic mono-repo support then great. Otherwise we can explore this solution. |
${fileDirname}
doesn't work with nestingcwd
based on pyproject.toml
or ini
file location
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
Would be great to have proper monorepository support without code-workspace (because they don't work with devcontainers). In my setup (Poetry with in-project .venv, MyPy, monorepository with linked packages in GitHub Codespaces), this extension is currently not usable. |
This feels related to an issue I raised earlier: #234 Would be great to support some kind of "current project" scope for type checking! |
The instructions added in aee3832 don't work in the presence of additional directories. Consider:
when running on
myfile.py
I want thecwd
to belibA
, notsubDirA
. I think the correct value should be${fileWorkspaceFolder}
but this produces a crash before and after this patch.It would also be good to log something better when this crash happens. Right now you just get
This is a common thing when using multiple virtual environments as suggested in https://github.com/microsoft/vscode-python/wiki/Mono-Repo-Set%E2%80%90up-Guide#scenario-2-separate-virtual-environments. I think what we want is
${fileWorkspaceFolder}
or${workspaceFolder}
-- I'm not sure because the docs are confusing. But we want the workspace folder to which the currently open file belongs.https://code.visualstudio.com/docs/editor/variables-reference
The text was updated successfully, but these errors were encountered: