-
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
[Feature] Pass 'workspace_folder' value to the layout files #4840
Comments
Please, consider that feature to be implemented in nearest releases! In our build scenarios, source folders and build folders are never related, so after upgrade to 1.13.2, we cannot use workspaces at all - there no such a profile, that can describe relations between unrelated values. I reported this issue in #4800 - but is was closed, despite of the description: I explicitly stated we need to build to subfolders of workspace folder, not somewhere nearby sources folder. Another option would be to allow simplified workspace generation - by invoking "usual-mode" generator for root package into the workspace folder: our custom generators are supporting editable packages, and including them into build as sub-projects automatically. |
Hi @ezaiakinsc. I did a quick trial in the past and it wasn't as straightforward as I was expecting. IMHO (and this is conditioned by the POC I'm implementing here #5314) I also support this functionality and I think it is mandatory for proper implementation of workspaces. Different workspaces may use the same library and they need different directories, even more (and we will disagree on this) I think that the workspace should force the build directory. Coming back to the current implementation of workspaces I think that this feature is really nice, but not mandatory; so I'm very interested in understanding your use case so we can realize why it is needed. Why can't you use as a folder nearby sources folders? Why is it a stopper to use workspaces? Thanks for the feedback. |
Hi @jgsogo In our use case, sources for libraries are checked out from git partially by automatic script into separate area, partially manually into user home directory. Creating build folders for intermediate artifacts in those areas is not an option, so anything-relative-to-sources does not work for us. Say, on Windows sources could be on drive C:, and workspace on drive D:, I guess there are no such a relative path exists. Mentioned POC looks promising, idea of locking build artifacts into workspace folder sounds really good! However, I would like to consider couple of things to make it usable for us:
Maybe it makes sense to introduce "light workspaces" for those, who need exactly same functionality, as "conan editable add && conan install", but not on system-wide level, just for specific build directory? Last revisions of workspaces are going further away from such a naive implementation. In our case, for Android platform (we are developing cross-platform products), invocation of conan is done by Gradle plugins, multiple times, with different settings (per arch, for example). Build directory is dictated by Gradle, and output must be generated exactly at this path. With "conan install" command and editables that work like a charm - custom generator delivers same CMake targets as editable sources or as compiled libs, and top-level "consumer" project just don't care. Same works for Gradle and Java counterparts of the libraries - they are automatically attached either as source subprojects, or as compiled .aar files from corresponding conan package folder, based on json, generated by conan, all custom generator/Gradle needs for that - path to the root of the package/root of the editable. |
Hi @jgsogo, for us this would be also an important feature. We are using the TI Code Composer Studio IDE (based on Eclipse), for which we have written a custom CMake Generator (based on the Visual Studio Compiler). |
Hi @jgsogo I too am looking for a way to use the workspace folder in the jinja expression. Right now I find the layout file mechanism to be problematic on how it specifies the build folder: it doesn't allow out-of-source builds unless you blindly do a I want to issue a command like |
layout files deprecated long time ago in favor of |
Hi!
I think it will be useful to have the
workspace_folder
value available in the layout files, it will allow to define all thebuild_folder
of the editable packages that belongs to the workspace inside the same directory, let me show you an example:Given a workspace definition:
The layout file could be
... [build_folder] {{ workspace_folder }}/build/{{ reference.name }}
Take into account that this variable will only be available when working with workspaces, so the layout file should add some conditions if it is going to be used for editable packages too.
Some preliminar work can be found here (not even a POC)
The text was updated successfully, but these errors were encountered: