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.
This PR removes the default recursion limit from every single function defined in UnrolledUtiliites.
I was previously maintaining a list of which functions defined in UnrolledUtilities can be used recursively, and only disabling the default recursion limits of those functions. However, this list keeps needing to get expanded with new types of functions. It previously included all functions that call themselves and all functions whose arguments can be arbitrary functions (including themselves), but CliMA/ClimaCore.jl#1713 has shown in ClimaCore Buildkite Run 4398 that
unrolled_product
also needs to have its recursion limit disabled because it is used recursively in ClimaCore, even though it doesn't fall into either of those categories. In order to avoid dealing with any more recursion-related type instabilities due to this package, I am introducing the following generic piece of code at the end of the module:Note to anyone who wants to use this code: Since this disables all recursion limits, it can easily lead to increased compilation time of recursive code. Do not use this unless the compilation time of all functions defined in a module is insignificant compared to their type stability.