conan-io / conan-io/docs

[feature] Remove or document effect of EOL on recipe revisions

Open
#1,518 10 comments 0 reactions 1 assignee Claimed by @memsharded View on GitHub
complex: low priority: medium stage: queue
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

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](https://docs.conan.io/en/latest/versioning/revisions.html)
- 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.

- [x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.