Work around failures on platforms where the number of files open at once is limited #933
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A number of users have been reporting failures on macOS such as:
ever since ocaml/opam-repository#27273 was merged.
Turns out the issue is a GNU Patch bug as it keeps open all the files modified by a given patch file and so it blows up on large patches when
ulimit -n
is too small, which is the case for github actions' macos-latest. It would've been possible to work around it usingulimit -n
if GNU Patch had done a patch release in the last 7 years as another bug preventing the workaround was fixed upstream but never released (see https://savannah.gnu.org/bugs/?55797)opam 2.4 should fix this issue for good as we were planning to move away from GNU Patch but sadly the release is few months away. In the meantime the only workaround i could think of is to change the key the github action cache associated with setup-ocaml for macos-latest so that everyone refetch opam-repository from scratch instead of using
opam update
.If this fix works for you, a minor release of v3 would be highly appreciated so everyone is able to fix their CI simply by restarting the failed jobs.