Description
What is your suggestion?
Related to #18263
What
Using the conan workspace add/remove
commands should allow relative paths above the current workspace folder, for instance I should be able to add a package whose folder is on the same level as my workspace by running conan workspace add ..\some_package
or even a package whose folder is one level higher than my workspace by running conan workspace add ..\..\some_package
.
Why
The current design path of workspaces suggests that an intended use case is to have a git repo for a fixed workspace which includes the packages for that workspace as submodules. This is good, I like the idea, but it doesn't cover common use cases for us, which include creating ad-hoc workspaces on a related subset of our (400+) repos, or quickly adding/removing a package to/from an existing workspace.
We already have tooling around creating virtual environments and adding git worktrees to those venvs, which also seems to be an intended use case, and in practice this works fine, but I wouldn't say it works great. It means the venv folder becomes the workspace folder, which tends to clutter things up. Being able to have a separate folder for the workspace within the venv would be preferable (and without having to manually edit the workspace files).
In a similar vein, having a single workspace for my day-to-day projects folder is not feasible, I currently have several (sometimes overlapping) Conan 1 workspaces for working on different areas of our codebase. Again, I believe I can do this with the current implementation in Conan 2, but it means editing the workspace files by hand or writing scripts to do that for us instead of using the built in commands, which would be preferable.
Have you read the CONTRIBUTING guide?
- I've read the CONTRIBUTING guide