-
Notifications
You must be signed in to change notification settings - Fork 985
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
Lightweight workspaces aka Temporary editables #5566
Comments
Yes, it could be a nice feature and really easy to implement. We opted for the workspaces way instead of adding more features around editables because we think that editables is not the final answer from the developer point of view. The reason why you use editable packages it is because you want to modify sources from all of them, with editables you need to open each of them individually (I'm thinking about VS) while the workspace solution should offer you the opportunity to open them all into a single solution, so just one IDE window (again thinking about VS). We/I may be wrong about previous assumptions, so any feedback you can provide is more than welcome. |
Hi @jgsogo, You are totally right, surely, workspaces are designed to cooperate with OSS cmake/etc generators and make them powerful in scenarios with MSVC-alike multi-projects. However, for custom generators workspaces or for people using, say, Android Studio instead of Microsoft infrastructure, workspaces are not very helpful. Comparing to editables, workspaces are imposing additional limitations, for example, inability to use unrelated build directories (showstopper for us) or inability to use conanfile.txt as root element. With our custom generators and Conan editables, we are already able to generate multi-project configuration, editing and compiling them all in one solution, exactly like you described. With our custom NLO generators no need to edit/build them separately, it is limitation of the OSS cmake generator, not limitation of editables as concept. We have already described our use case here: #4878 - it actually perfectly works with editables, seamlessly delivering dependencies as sources or as binaries, depending purely on editables configuration. Please consider implementing "lightweight workspaces/temporary editables" in nearest releases, workspaces are unusable for us, at least since 2018. As result, we had to cut workspaces support from our system completely, and developers are irritated by everyday needs to add/remove editables just to invoke conan install. If we will have "temporary editables", we'll need no workspaces at all, so I will be able to close workspace-related issue #4801 as well. |
I understand your pain, and it would be nice to have this feature. Right now for the common use case, the lightweight workspaces is not something very useful because you should provide through the command line the There are two other things that may affect this development:
As you can see, both proposals are targetting layouts, so they are no longer necessary or not as an external file. If we don't need layouts for editables, then the command line you are demanding is just a list of references and it would be an easy way to create a temporary WS. Until then, maybe you just need a shell script that makes this for you: wrap the |
Ticket #15992 is gathering the information for workspaces in Conan 2, lets follow up there, I am closing this ticket. |
To help us debug your issue please explain:
Documentation states, that workspaces are similar to editables, just not system-wide ones. Unfortunately, it is not exactly correct: current workspaces do require a lot of additional parameters like roots etc, which are not like non-system-wide editables, and prevents such a workflow (for example, by demanding relative path between sources and build directory, which is not always possible - say, C: and D: drives on Windows).
We are suggesting new simple feature: optional argument for conan install command - filename of the workspace file, that contains ONLY list of editables (or other fields are ignored, whatever, you choose best). If this parameter is set, Conan performs "editable add" for each element of list in-memory, without changing global configuration, and then performs conan install action, as usual (works perfecly with custom generators).
One can see, we are suggesting literally "editables, just not system-wide ones", for us that would be ideal (also I believe I saw other teams mentioned in issues it will be good for their workflow too).
This feature is finite (no need to iterate syntax etc as long as performs same as "editable add" but in memory), and simple to implement (we prototyped it in local fork in few hours, and we are not experts in Conan sources at all).
Please consider implementing "lightweight workspaces/temporary editables" in nearest releases, if possible.
The text was updated successfully, but these errors were encountered: