-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include statement circular dependency #576
Comments
Does your Can you provide a minimal repro? |
@sebastienros Thx for quick response Absolutely not circular dependency :) |
I can share you a part of code and folder structure or what do you need else from my side? |
Ideally a PR with a unit test that would show the problem, or a minimal Program.cs that I can run locally. You can also try the sharplab.io website and share a link to the repro. |
I can't reproduce the problem throw unit tests. When I run tests - it looks fine. Just in runtime, I experiencing this problem. |
@kinotavr1996 i was getting this issue when i set MaxSteps to 100, and my template apperently needed more 'steps'. It gives a cyclic recursion exception which is not the right message. My config now is; MaxSteps = 10000,
MaxRecursion = 100 So as a test try and remove Edit; You can see this in; fluid/Fluid/TemplateContext.cs Line 111 in 8564be1
/// <summary>
/// Increments the number of statements the current template is processing.
/// </summary>
public void IncrementSteps()
{
var maxSteps = Options.MaxSteps;
if (maxSteps > 0 && _steps++ > maxSteps)
{
ExceptionHelper.ThrowMaximumRecursionException();
}
} Maybe this should throw a better exception message pointing at the max steps option. EDIT2: This is a typo and should instead be |
@sommmen Let me try. Even we can schedule a short google meeting for 5 min and I'll show you how it's looks like if you are interested in |
on line |
I have the root template with
include
statementMy partial template is empty
When I debug it throws a unit test - it looks fine
When I debug it in runtime - get
The maximum level of recursion has been reached. Your script must have a cyclic include statement.
Package v. 2.4.0
{% include "sub_template_name" %}
When I remove
MaxSteps
- my application stacking and memory leak comes.Could, you, please help me?
The text was updated successfully, but these errors were encountered: