The solution
After thoroughly examining and familiarizing our client’s technology environment, VirtusLab implemented a series of targeted strategies to improve optimization and efficiency and address the challenges faced with CLion and VS Code.
Enhancements to VS Code
VirtusLab developed a custom tool for VS Code to generate compile commands and reduce generation time. To integrate this functionality into VS Code, we created a dedicated extension.
CLI tool
- Reliable source/header file generation: Ensured accurate code highlighting by generating all necessary source and header files.
- Performance optimization: Allowed deactivation of some source code generators to enhance overall performance.
- Incremental synchronization: Offered faster feedback when modifying BUILD files through incremental synchronization.
- Multi-repository support: Enabled managing multiple dependent Bazel repositories within a single workspace.
VS Code Extension
- Development efficiency: Included a dedicated panel for frequent actions such as build, run, debug and project synchronization.
- Instant indexing: Streamlined the process to connect with a remote indexing server. This provides immediate, full access to the project’s indexed data, enabling fast comprehensive code navigation and analysis.
- Incremental indexing for local changes: Enabled incremental indexing to maintain accurate navigation and usage searches.
- Contextual file inspection: Allowed quick viewing of header files in the context of various targets that use them.
Additional enhancements
- Quality control: Integrated statistics and testing to monitor command quality and detect potential regressions, confirming most editor errors stem from incorrect build definitions.
- Client-specific customization: Tailored the tool to meet specific client requirements, including custom Bazel build definitions.
Optimization of CLion
We turned to CLion and enhanced its efficiency.
- Reduced the test indexing time by modifying the source code of CLion and the Bazel plugin.
- Optimized project configurations, reducing project import and synchronization times.
- Trained users on how to properly write project configurations.
- Integrated support for reverse dependencies, crucial for finding usages or performing codebase-wide refactorings without full imports. It enhanced the reliability and efficiency of the development process.
IDE Configuration efficiency
To bind it all together, we implemented a command-line tool to preconfigure CLion, IntelliJ, and VS Code. This ensured that developers could consistently and efficiently use their IDE setups automatically.