Description
When a recipe revision is calculated as a hash of exported files (revision_mode = hash
), different EOL conventions will lead to different recipe hashes. This can cause problems that are difficult to figure out, as I describe below. I suggest that you do one of the following:
- Change the hashing algorithm so that it ignores EOL markers
- Add a clear warning to the documentation
- Add a new revision mode that makes EOL-independent hashes (e.g.
revision_mode = hash_noeol
) and explain in the documentation why someone might want to use it (or not use it, e.g. if the exports include files where EOL is significant).
The case that motivated this report, in case you're interested:
We recently had an issue where Conan kept insisting on building a package from source rather than download a prebuilt binary package from Artifactory. We verified that the package IDs were equal, so we knew that the build settings and options were the same. After quite a bit of investigation, we figured out that the packages on Artifactory had been uploaded with different recipe revisions for the Windows and Linux builds. In our case, the Windows package had been built slightly later than the Linux package, and therefore became the "most recent" one, so when we then tried to use the package on Linux, Conan couldn't find binaries for the most recent RREV. As it turned out, the whole thing was caused by a file that had been added to the exports, which got checked out with CRLF endings on the Windows build nodes and LF endings on the Linux build nodes.
- I've read the CONTRIBUTING guide.