3 ms·
> Changes to C source files of a shared library should not require a rebuild of dependents Yes it should, as dependents may be looking for the existence of a g
by jcelerier 6y ago
> Changes to C source files of a shared library should not require a rebuild of dependents
Yes it should, as dependents may be looking for the existence of a given function being exported from the library at build time (through dlopen/dlsym) and enable / disable features accordingly
- devit 6y agoYeah, that only applies if the build process of the dependents does not actually use the shared library itself (other than for linking to it).
- kevincox 6y agoThis issue can be solved by extracting the "interface" and using that as the input. So for a shared library the interface may be all exported symbols. If that changes in any way you should rebuild the dependencies (to be cautious). I think the ideal way to do this is to make a "dummy" library with the same interface and expose that to the build of the other program. That way you know it doesn't depend on anything else. Of course there are complexities: - What if the library is called in the build. Maybe the shim can proxy back to the original? But now you risk it depending on something. For tests proxying may make sense for build maybe not. - For Nix you still want to produce a new output that is hardcoded to the new library version. You can skip the compile, but you still need to update the references.