[llvm] [llvm] Revise IDE folder structure (PR #89741)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 01:14:44 PDT 2024


jh7370 wrote:

> > I see a benefit in renaming folders like "Tools" and "Tests" to "LLVM Tests" and "LLVM Tools", but I really don't think having folders within folders is a good UI for regular projects: it'll mean extra clicking in the solution explorer just to get to the file you want (a process which is already a bit suboptimal as it is), for no real added benefit when you can just make the folders top-level and named to distinguish subprojects.
> 
> Having the suprojects in subfolders allows you to unload these projects from the VS IDE solution (including LLVM itself) without re-running cmake.

When you say "unload these projects" are you referring to effectively disabling them via the "Unload solution projects in folder" option? If so, you don't need them in a subfolder to achive this: just select multiple folders and click "Unload project". So, if you named all the, e.g. clang folders `Clang ...` they'll be trivially easy to multi-select, since they'll be in order.

> It remembers which folders are expanded or collapsed after reloading or even rerunning cmake so if you prefer subprojects expanded there is only one additional click per subproject you will ever need to do. Usually, you only expand those you are actually working on in which case this means less clutter in the project view.

As someone who routinely works in projects similar to LLVM where the solution uses cmake, but not the built-in VS variation, I agree that it does appear to _normally_ remember the expansion/collapse state, but I've also seen many instances where it doesn't, especially where projects need reloading following an implicit cmake run due to a CMakeLists.txt file change. It also doesn't account for the fact that I routinely expand and collapse folders, so that I can easily see the projects I'm currently working on (often I am working on multiple projects in different folders at the same time in my local codebase). This is especially significant for solutions with many projects like LLVM, where they take up more screen space in the Solution Explorer, and worse when using a small screen like a laptop. So, if this change were to land as-is, with additional layers of subfolders, it would make my experience working with LLVM worse, not better (note: I am strongly in favour of rationalising the organisation as you're attempting, just not with subdirectories).

https://github.com/llvm/llvm-project/pull/89741


More information about the llvm-commits mailing list