-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Storage Engines
-
StorEng - Defined Pipeline
The src/include/wiredtiger.in file is transformed into src/include/wiredtiger.h by cmake and some fields (like the version numbers) are populated during the transition.
There are some other auto-generated artifacts in wiredtiger.in which are committed via source control. Most importantly the statistics, which are changed regularly.
Ideally the auto-generation would happen as part of the compile step when necessary. Doing it during cmake configuration setup would be acceptable (since s_all also generates the changes - and could be updated to operate on wiredtiger.h instead/as well as wiredtiger.in, so the developer workflow will continue to pickup changes).
Less importantly, the error codes are also pre-auto-generated. Those cause less disruption because they don't change regularly.
Bonus: If you get into a rhythm with this change, it would be really nice to also auto-generate header file changes along with make (or ninja). That is done by dist/s_typedef and generates the content here
Note, that the precedent for this is content in wiredtiger.in wrapped in a pair of @ characters, like here. It is currently handled during cmake here - in an ideal world that would be changed so that it's done via make or ninja instead of cmake.
I think something like is described here (https://stackoverflow.com/questions/21406429/cmake-compile-time-generation-of-source) should give the behavior we want. We probably want a wrapper that makes it cheap when no changes are possible.