Skip to content
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

Nested loops don't work???? #654

Open
iamcomcy opened this issue Jun 21, 2023 · 1 comment
Open

Nested loops don't work???? #654

iamcomcy opened this issue Jun 21, 2023 · 1 comment

Comments

@iamcomcy
Copy link

Describe the bug
I am not sure this would be called a bug, but perhaps a critical feature oversite???

Anyway, it shouldn't be this way.

A clear and concise description of what the bug is:

Experimental changes to TodosMVC sample app.
Added this to a template HTML view file:

<% for_each(hierarchy) do (ont_text, surveys) %>

Onit: $(ont_text)

<% for_each(surveys) do (survey_text, questions) %>

Survey: $(survey_text)

<% end %> <% end %>

Many experiments. Inner most loop always works even 4 levels deep, but only the inner most, which seems to indicate the outer loops don't.
At 4 levels deep, the innermost loop would print. Delete the 4th, the third would print, but not the first or second. Delete the third, the second would print, but not the first.

I worked with ChatGPT to get error logs ... there were NONE. No server output either. Silent failure.

Please note, using "for_each" here. Nested "for" loops don't work AT ALL.

This code in Julia, works perfectly with for_each or for:

for_each(hierarchy) do (ont_text, surveys)
println("Onit:", ont_text)
for_each(surveys) do (survey_text, questions)
println("Survey: ", survey_text)
for_each(questions) do (question_text, answers)
println("Question: ", question_text)
for_each(answers) do (answer)
println(answer)
end
end
end
end
June 20, 2023

Error stacktrace
If any error is thrown, please copy from the REPL and paste it here

To reproduce
Steps to reproduce the behavior and/or Julia code executed.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Please include the output of
julia> versioninfo()
and
pkg> st

@essenciary
Copy link
Member

Thanks for the detailed report, we'll look into it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants