Details
-
Suggestion
-
Resolution: Won't Do
-
P4: Low
-
None
-
6.8.0
-
None
Description
qt_add_repc_sources and friends causes repc compiler to run during cmake build. However, if the project is opened for the first time, the repc has not run yet before the first build. This has the downside of clangd complaining about missing headers until the first build.
repc compiler should instead fire when the project is being configured so that clangd can already see the header and offer auto completion suggestion right after the project hierarchy is already loaded.
Since Qt Creator already automatically reconfigure the project when changes to cmake modules are detected, this has the additional benefit that changes to the .rep files causes the generated header file to be updated automatically, so when there are changes to the .rep file, the users won't have to first rebuild it, see compile time errors, then fix the problems and rebuild it, instead the header file is automatically updated and users can already see clangd complaining about issues.