rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

librepo.h: Change how project files are included #271

Closed mcrha closed 1 year ago

mcrha commented 1 year ago

Use path-reference in the public header, to avoid ambiguity for generic-like header files from other projects. Otherwise it would depend on the order of the include directories in the build time, which of the header file is picked.

evan-goode commented 1 year ago

Thank you, I understand the rationale for this change.

librepo.h isn't the only public header; some consumers of librepo #include util.h or yum.h, for instance. It would be best to keep the behavior consistent across all the headers. Are there any drawbacks to using the path-reference style throughout all the headers in the project?

mcrha commented 1 year ago

It would be best to keep the behavior consistent across all the headers.

I agree.

Are there any drawbacks to using the path-reference style throughout all the headers in the project?

I'm not aware of anything. The public headers should be referenced with the path. I'll update the pull request.

mcrha commented 1 year ago

I updated the pull request and split the changes into three commits:

The last change might help the build scripts to properly detect changes in these files, but it's untested.

jan-kolarik commented 1 year ago

Nice, thanks for the improvement!