Navigating code without requiring "make" (e.g. read-only exploration, ctags-style)
I'm evaluating CLion for suitability to purchase for work on a large, commercial C project. It seems that the only way to leverage the code navigation feature is to have CLion be able to compile the project with cmake integration. This is a non-starter for us as the compilation system we're using is highly customized and tied into a number of non-Make-based scripts and environment settings.
Furthermore, we need to be able to explore & navigate codebases on otherwise read-only filesystems, as 1.) the build takes very long; 2.) we have trees we publish on network filesystems that we cannot write in-place.
I'm comparing CLion against the venerable "vim" with ctags integration, which allows me to quickly and easily navigate the entire codebase with a single tags file generated. With CLion, it appears I cannot navigate the code unless I use its native build/make integration. If this is true, we cannot be a customer.
Please tell me there is a non-invasive, non-destructive method of using CLion to view and navigate the tree.
Please sign in to leave a comment.
Hello!
The current CLion concept is the following: C++ is the language which parsing/resolve requires some extra knowledge like compilation flags, header search paths, etc. This information is stored in the project model, and CLion extracts it from there to understand your project better and resolve your code correctly. W/o this info the code can be broken by a simple refactoring affecting the whole project. So CLion provides truly smart code features only for projects that are based on one of the supported project formats and are properly configured/loaded in CLion.
But we understand that the ability to “just” open some folders with C/C++ sources and have CLion working reasonably well in such a setup is important. We plan to start working on this during the CLion 2023.3 release cycle. This idea is highly experimental at present, and we can’t promise a public release in 2023.3. See our roadmap for CLion 2023.3.
For now, as a workaround, you can try creating a compilation database for your project and open it in CLion - https://www.jetbrains.com/help/clion/compilation-database.html
Much appreciation for taking the time to write back. Our project is almost entirely C, very little C++, and includes some open source C code we'd like to work on as well (such as Linux kernel). It sounds as though at present the CLion requirement is to bend the problem to match the tool, rather than bend the tool to match the problem. We'll have to stick with vi and ctags until CLion is ready for this use case, but will be eagerly waiting for the chance to try it again.
Feel free to subscribe to our blog to get all the news and stay updated on improvements in the “just open some folders with C/C++ sources” scenario in CLion.
Are there any news regarding this subject? any work in progress?
thanks :)
Ibenlayish, it's a work in progress. Feel free to comment or upvote CPP-34547 in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.