Thanks for taking care of it. Do you have an idea why this might be happening under only a few circumstances (os differences, cleanup before build)?wmayer wrote: ↑Mon Jul 11, 2022 8:16 am When looking at the git history then in the recent days a lot of includes has been removed in dozens of files. So, in one of the commits a header is not included any more that includes <memory> where the unique_ptr is defined. So, to fix the build failure just do what you did and add the missing file to PointConstraintPyImp.cpp
[Part] Build failure
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: [Part] Build failure
My latest (or last) project: B-spline Construction Project.
Re: [Part] Build failure
This can depend on different compiler, different compiler versions or different library versions.
As a general rule:
If a certain type is used in the code then the header where it is declared must be included.
An exception is a header file where a forward declaration can be used instead.
IMO the attempts to reduce the number of includes to a minimum is cumbersome because:
- it will be mainly optimized for one specific configuration (of OS, compiler version and library versions)
- this increases the likelihood of a failure somewhere else or sometime later if OS, compiler or a library has been upgraded
- the time it requires to achieve that you will never ever get back with a slightly faster build
It makes much more sense to remove unneeded includes in header files because a header might be included over and over again by some other header or source files and if there are many unneeded includes this can considerably slow down the build process.
Re: [Part] Build failure
I think this is the only part I can disagree with. Provided the time spent reducing includes is not too much, the cumulative time saved by all people who compile may be significant.
My latest (or last) project: B-spline Construction Project.